From e26bbdbbf7ac3cfe39f562ec51c1bfd4370a095b Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Wed, 31 Jan 2024 21:26:55 +0000 Subject: [PATCH] I18N: Load new translation library in `wp_load_translations_early()`. Ensures localization continues to work as expected with the new library in case translations need to be loaded early in the process. See #59656. git-svn-id: https://develop.svn.wordpress.org/trunk@57504 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/load.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 0dbbc187cf..6c28453b21 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -1484,6 +1484,11 @@ function wp_load_translations_early() { // Translation and localization. require_once ABSPATH . WPINC . '/pomo/mo.php'; + require_once ABSPATH . WPINC . '/l10n/class-wp-translation-controller.php'; + require_once ABSPATH . WPINC . '/l10n/class-wp-translations.php'; + require_once ABSPATH . WPINC . '/l10n/class-wp-translation-file.php'; + require_once ABSPATH . WPINC . '/l10n/class-wp-translation-file-mo.php'; + require_once ABSPATH . WPINC . '/l10n/class-wp-translation-file-php.php'; require_once ABSPATH . WPINC . '/l10n.php'; require_once ABSPATH . WPINC . '/class-wp-textdomain-registry.php'; require_once ABSPATH . WPINC . '/class-wp-locale.php';