Make WordPress Core


Ignore:
Timestamp:
11/10/2022 07:42:58 PM (20 months ago)
Author:
ocean90
Message:

I18N: Always pass $locale to load_textdomain().

In [53874] the optional $locale parameter was added to load_textdomain(). While most load_textdomain() calls in core were were updated, some were missed. Passing the original locale avoids the need to call determine_locale() by load_textdomain() which is used as a fallback.

Props ocean90, swissspidy, desrosj.
Merges [54797] to the 6.1 branch.
Fixes #57060.

Location:
branches/6.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.1

  • branches/6.1/src/wp-includes/functions.php

    r54796 r54798  
    63486348        $mofile        = WP_LANG_DIR . '/continents-cities-' . $locale_loaded . '.mo';
    63496349        unload_textdomain( 'continents-cities' );
    6350         load_textdomain( 'continents-cities', $mofile );
     6350        load_textdomain( 'continents-cities', $mofile, $locale_loaded );
    63516351        $mo_loaded = true;
    63526352    }
Note: See TracChangeset for help on using the changeset viewer.