From 54a61e9c9b36970fe18b33fe2c35a5823617ffca Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 4 Apr 2024 13:38:11 +0000 Subject: [PATCH] I18N: Always search for script translations in `wp-content/languages/plugins`. Previously, when `WP_PLUGIN_DIR` was set to something other than `wp-content/plugins`, e.g. `wp-content/mods`, `load_script_textdomain` was searching for script translations in `wp-content/languages/mods`. However, that is incorrect, as `WP_PLUGIN_DIR` does not affect where translations are stored. The location is always `wp-content/languages/plugins`. Props coreymckrill, swissspidy. Fixes #60891. Built from https://develop.svn.wordpress.org/trunk@57922 git-svn-id: http://core.svn.wordpress.org/trunk@57423 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 38c30b84e8..b4f1701fe7 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -1189,7 +1189,7 @@ function load_script_textdomain( $handle, $domain = 'default', $path = '' ) { $relative = trim( $relative, '/' ); $relative = explode( '/', $relative ); - $languages_path = WP_LANG_DIR . '/' . $relative[0]; + $languages_path = WP_LANG_DIR . '/plugins'; $relative = array_slice( $relative, 2 ); // Remove plugins/ or themes/. $relative = implode( '/', $relative ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 787874b2cb..e2ba1dab69 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57921'; +$wp_version = '6.6-alpha-57922'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.