mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
I18N: Don't initialize WP_Locale_Switcher in wp_load_translations_early().
`wp_load_translations_early()` is used when WordPress isn't fully initialized. Therefore using the `WP_Locale_Switcher` with `get_locale()`/`get_user_locale()` can cause PHP fatal errors. This reverts [38976] and [38977], and instead removes `WP_Locale_Switcher` from `wp_load_translations_early()`. See #29783. Fixes #38535. git-svn-id: https://develop.svn.wordpress.org/trunk@39005 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -917,8 +917,6 @@ function wp_load_translations_early() {
|
||||
}
|
||||
|
||||
$wp_locale = new WP_Locale();
|
||||
$wp_locale_switcher = new WP_Locale_Switcher();
|
||||
$wp_locale_switcher->init();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user