You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ON VALIDATE METHOD:
-- Info was only for developers.
-- Also, removed escaping.
- ON GET METHOD:
-- Added escaping on wp_die().
REVIEW: other codes and comments.
__( 'Use your plugin\'s unique prefix for <code><b><em>Config::get()</em></b></code> to get the config instance', 'tws-onboarding' ),
424
-
__( 'Default prefix <b><em>"thewebsolver"</em></b> is being used', 'tws-onboarding' ),
425
-
wp_kses( $located, $allowed_html )
426
-
);
414
+
$prefix_title = 'Onboarding class prefix error';
415
+
$prefix_msg = sprintf( '<h1>%1$s</h1><p>Use your plugin\'s unique prefix for <code><b><em>Config::get()</em></b></code> to get the config instance.</p><p>Default prefix <b><em>"thewebsolver"</em></b> is being used.</p><p>%2$s</p>', $prefix_title, $located );
$note = __( 'Set unique namespace to instantiate <code><b><em>Config::get()</em></b></code> and declare the same namespace at the top of the <code><b><em>Config.php</em></b></code> and <code><b><em>Includes/Wizard.php</em></b></code> files.', 'tws-onboarding' );
420
+
$note = 'Set unique namespace to instantiate <code><b><em>Config::get()</em></b></code> and declare the same namespace at the top of the <code><b><em>Config.php</em></b></code> and <code><b><em>Includes/Wizard.php</em></b></code> files.';
445
421
446
422
// Case where namespace not declared.
447
423
if ( 0 === strlen( __NAMESPACE__ ) ) {
448
-
$notitle = __( 'Namespace not declared', 'tws-onboarding' );
449
-
$nons = __( 'Onboarding Config was instantiated without namespace.', 'tws-onboarding' );
450
-
451
-
returnnewWP_Error(
452
-
'namespace_not_declared',
453
-
sprintf(
454
-
'<h1>%1$s</h1><p>%2$s</p><p>%3$s</p><p>%4$s</p>',
455
-
esc_html( $notitle ),
456
-
esc_html( $nons ),
457
-
wp_kses( $note, $allowed_html ),
458
-
wp_kses( $located, $allowed_html )
459
-
),
460
-
esc_html( $notitle )
461
-
);
424
+
$notitle = 'Namespace not declared';
425
+
$nons = 'Onboarding Config was instantiated without namespace.';
0 commit comments