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
This commit is contained in:
parent
9ac3e01c91
commit
54a61e9c9b
|
@ -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/<plugin name> or themes/<theme name>.
|
||||
$relative = implode( '/', $relative );
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue