mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
I18N: Don't use get_available_languages()
in _load_textdomain_just_in_time()
.
`get_available_languages()` is only designed to work with translations for core. Using it for plugins/themes means unnecessary `strpos()` checks and incomplete results for plugins/themes whose names are beginning with `admin-` or `ms-`. Props swissspidy, ocean90. Fixes #38590. Built from https://develop.svn.wordpress.org/trunk@39230 git-svn-id: http://core.svn.wordpress.org/trunk@39170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9daebf050a
commit
c3dc173799
@ -859,8 +859,9 @@ function _load_textdomain_just_in_time( $domain ) {
|
||||
);
|
||||
|
||||
foreach ( $locations as $location ) {
|
||||
foreach ( get_available_languages( $location ) as $file ) {
|
||||
$cached_mofiles[] = "{$location}/{$file}.mo";
|
||||
$mofiles = glob( $location . '/*.mo' );
|
||||
if ( $mofiles ) {
|
||||
$cached_mofiles = array_merge( $cached_mofiles, $mofiles );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta3-39229';
|
||||
$wp_version = '4.7-beta3-39230';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user