Make WordPress Core

Changeset 60231

Timestamp:
05/11/2025 05:14:52 PM (5 months ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-locale-switcher.php

    r59592 r60231  
    288288
    289289        if ( $phpmailer instanceof WP_PHPMailer ) {
    290             $phpmailer->SetLanguage();
     290            $phpmailer->setLanguage();
    291291        }
    292292
  • trunk/src/wp-includes/class-wp-phpmailer.php

    r59592 r60231  
    2525    public function __construct( $exceptions = false ) {
    2626        parent::__construct( $exceptions );
    27         $this->SetLanguage();
     27        $this->setLanguage();
    2828    }
    2929
     
    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(
     
    8888            'variable_set'         => __( 'Cannot set or reset variable: ' ),
    8989        );
    90         $this->language = $error_strings;
     90
    9191        return true;
    9292    }
Note: See TracChangeset for help on using the changeset viewer.