Make WordPress Core

Changeset 57704


Ignore:
Timestamp:
02/24/2024 09:46:11 AM (17 months ago)
Author:
swissspidy
Message:

I18N: Do not set translation controller locale in bootstrap.

Removes the WP_Translation_Controller::set_locale() call from wp-settings.php, which happened before the current user was loaded.
That caused translations to be missing when the site locale and user locale were different, as the translation was associated with the wrong locale.

Turns out this call was not needed at all, as the locale will be set/updated when calling load_textdomain() anyway.

Props oglekler.
See #59656.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-settings.php

    r57685 r57704  
    642642$GLOBALS['wp_locale_switcher']->init();
    643643
    644 WP_Translation_Controller::get_instance()->set_locale( $locale );
    645 
    646644// Load the functions for the active theme, for both parent and child theme if applicable.
    647645foreach ( wp_get_active_and_valid_themes() as $theme ) {
Note: See TracChangeset for help on using the changeset viewer.