From eea9316c6357761b811391f409ef81db082042a2 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 21 Feb 2021 11:26:34 +0000 Subject: [PATCH] Replace $domain arg with string literal (missed these files the first time) --- class/hooks.php | 10 +++++----- class/task.php | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/class/hooks.php b/class/hooks.php index 4ef87cd..945ebab 100644 --- a/class/hooks.php +++ b/class/hooks.php @@ -62,11 +62,11 @@ class MCI_Footnotes_Hooks { public static function uninstall_plugin() { // WordPress User has to be logged in. if ( ! is_user_logged_in() ) { - wp_die( __( 'You must be logged in to run this script.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ) ); + wp_die( __( 'You must be logged in to run this script.', 'footnotes' ) ); } // WordPress User needs the permission to (un)install plugins. if ( ! current_user_can( 'install_plugins' ) ) { - wp_die( __( 'You do not have permission to run this script.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ) ); + wp_die( __( 'You do not have permission to run this script.', 'footnotes' ) ); } // Deletes all settings and restore the default values. // MCI_Footnotes_Settings::instance()->Clear_all();. @@ -83,11 +83,11 @@ class MCI_Footnotes_Hooks { */ public static function plugin_links( $p_arr_links, $p_str_plugin_file_name ) { // Append link to the WordPress Plugin page. - $p_arr_links[] = sprintf( '%s', __( 'Support', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ) ); + $p_arr_links[] = sprintf( '%s', __( 'Support', 'footnotes' ) ); // Append link to the Settings page. - $p_arr_links[] = sprintf( '%s', admin_url( 'admin.php?page=mfmmf-footnotes' ), __( 'Settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ) ); + $p_arr_links[] = sprintf( '%s', admin_url( 'admin.php?page=mfmmf-footnotes' ), __( 'Settings', 'footnotes' ) ); // Append link to the Play_pal Donate function. - $p_arr_links[] = sprintf( '%s', __( 'Donate', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ) ); + $p_arr_links[] = sprintf( '%s', __( 'Donate', 'footnotes' ) ); // Return new links. return $p_arr_links; } diff --git a/class/task.php b/class/task.php index f9c64d7..bef143c 100644 --- a/class/task.php +++ b/class/task.php @@ -960,10 +960,10 @@ class MCI_Footnotes_Task { switch ( $l_str_love_me_index ) { // Options named wrt backcompat, simplest is default:. case 'text-1': - $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); + $l_str_love_me_text = sprintf( __( 'I %2$s %1$s', 'footnotes' ), $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); break; case 'text-2': - $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ), $l_str_linked_name ); + $l_str_love_me_text = sprintf( __( 'This website uses the awesome %s plugin.', 'footnotes' ), $l_str_linked_name ); break; case 'text-4': $l_str_love_me_text = sprintf( '%s %s', $l_str_linked_name, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL ); @@ -972,10 +972,10 @@ class MCI_Footnotes_Task { $l_str_love_me_text = sprintf( '%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_linked_name ); break; case 'text-6': - $l_str_love_me_text = sprintf( __( 'This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ), $l_str_linked_name ); + $l_str_love_me_text = sprintf( __( 'This website uses %s.', 'footnotes' ), $l_str_linked_name ); break; case 'text-7': - $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ), $l_str_linked_name ); + $l_str_love_me_text = sprintf( __( 'This website uses the %s plugin.', 'footnotes' ), $l_str_linked_name ); break; case 'text-3': default: @@ -1262,14 +1262,14 @@ class MCI_Footnotes_Task { // Compose warning box:. $l_str_syntax_error_warning = '

'; - $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ); + $l_str_syntax_error_warning .= __( 'WARNING: unbalanced footnote start tag short code found.', 'footnotes' ); $l_str_syntax_error_warning .= '

'; // Syntax validation setting in the dashboard under the General settings tab:. - $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ), __( 'General settings', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ), __( 'Footnote start and end short codes', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ), __( 'Check for balanced shortcodes', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ) ); + $l_str_syntax_error_warning .= sprintf( __( 'If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %1$s > %2$s > %3$s.', 'footnotes' ), __( 'General settings', 'footnotes' ), __( 'Footnote start and end short codes', 'footnotes' ), __( 'Check for balanced shortcodes', 'footnotes' ) ); $l_str_syntax_error_warning .= '

'; - $l_str_syntax_error_warning .= __( 'Unbalanced start tag short code found before:', MCI_Footnotes_Config::C_STR_PLUGIN_NAME ); + $l_str_syntax_error_warning .= __( 'Unbalanced start tag short code found before:', 'footnotes' ); $l_str_syntax_error_warning .= '

“'; $l_str_syntax_error_warning .= $l_str_error_spot_string; $l_str_syntax_error_warning .= '”

';