diff options
-rw-r--r-- | src/wp-includes/class-wp-locale-switcher.php | 2 | ||||
-rw-r--r-- | src/wp-includes/class-wp-phpmailer.php | 8 | ||||
-rw-r--r-- | src/wp-includes/script-loader.php | 4 |
3 files changed, 5 insertions, 9 deletions
diff --git a/src/wp-includes/class-wp-locale-switcher.php b/src/wp-includes/class-wp-locale-switcher.php index db4ae298c6..55edef3c9c 100644 --- a/src/wp-includes/class-wp-locale-switcher.php +++ b/src/wp-includes/class-wp-locale-switcher.php @@ -287,7 +287,7 @@ class WP_Locale_Switcher { WP_Translation_Controller::get_instance()->set_locale( $locale ); if ( $phpmailer instanceof WP_PHPMailer ) { - $phpmailer->SetLanguage(); + $phpmailer->setLanguage(); } /** diff --git a/src/wp-includes/class-wp-phpmailer.php b/src/wp-includes/class-wp-phpmailer.php index b3c976d13d..4510e49e27 100644 --- a/src/wp-includes/class-wp-phpmailer.php +++ b/src/wp-includes/class-wp-phpmailer.php @@ -24,7 +24,7 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer { */ public function __construct( $exceptions = false ) { parent::__construct( $exceptions ); - $this->SetLanguage(); + $this->setLanguage(); } /** @@ -34,8 +34,8 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer { * * @return true Always returns true. */ - public function SetLanguage( $langcode = 'en', $lang_path = '' ) { - $error_strings = array( + public function setLanguage( $langcode = 'en', $lang_path = '' ) { + $this->language = array( 'authenticate' => __( 'SMTP Error: Could not authenticate.' ), 'buggy_php' => sprintf( /* translators: 1: mail.add_x_header. 2: php.ini */ @@ -87,7 +87,7 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer { /* translators: There is a space after the colon. */ 'variable_set' => __( 'Cannot set or reset variable: ' ), ); - $this->language = $error_strings; + return true; } } diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index fa4a038754..c82c620ffe 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -2679,12 +2679,8 @@ function wp_should_load_block_assets_on_demand() { * context (only enqueuing editor scripts while in context of the editor). * * @since 5.0.0 - * - * @global WP_Screen $current_screen WordPress current screen object. */ function wp_enqueue_registered_block_scripts_and_styles() { - global $current_screen; - if ( wp_should_load_block_assets_on_demand() ) { return; } |