Skip to content

Commit dcba873

Browse files
Coding Standards: Correct WP_PHPMailer::setLanguage() method name case.
PHP function names are not case-sensitive, so this aims to bring consistency with the parent method. Includes removing a one-time variable. Follow-up to [27385], [59592]. See #63168. git-svn-id: https://develop.svn.wordpress.org/trunk@60231 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 02d07b1 commit dcba873

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/wp-includes/class-wp-locale-switcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ private function change_locale( $locale ) {
287287
WP_Translation_Controller::get_instance()->set_locale( $locale );
288288

289289
if ( $phpmailer instanceof WP_PHPMailer ) {
290-
$phpmailer->SetLanguage();
290+
$phpmailer->setLanguage();
291291
}
292292

293293
/**

src/wp-includes/class-wp-phpmailer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer {
2424
*/
2525
public function __construct( $exceptions = false ) {
2626
parent::__construct( $exceptions );
27-
$this->SetLanguage();
27+
$this->setLanguage();
2828
}
2929

3030
/**
@@ -34,8 +34,8 @@ public function __construct( $exceptions = false ) {
3434
*
3535
* @return true Always returns true.
3636
*/
37-
public function SetLanguage( $langcode = 'en', $lang_path = '' ) {
38-
$error_strings = array(
37+
public function setLanguage( $langcode = 'en', $lang_path = '' ) {
38+
$this->language = array(
3939
'authenticate' => __( 'SMTP Error: Could not authenticate.' ),
4040
'buggy_php' => sprintf(
4141
/* translators: 1: mail.add_x_header. 2: php.ini */
@@ -87,7 +87,7 @@ public function SetLanguage( $langcode = 'en', $lang_path = '' ) {
8787
/* translators: There is a space after the colon. */
8888
'variable_set' => __( 'Cannot set or reset variable: ' ),
8989
);
90-
$this->language = $error_strings;
90+
9191
return true;
9292
}
9393
}

0 commit comments

Comments
 (0)