Exclude admin pot files when calculating the list of installed languages in get_available_languages(). fixes #20676

git-svn-id: https://develop.svn.wordpress.org/trunk@20788 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-05-14 17:58:06 +00:00
parent cdc9ebd779
commit ab8a4b7844
1 changed files with 2 additions and 1 deletions

View File

@ -540,7 +540,8 @@ function get_available_languages( $dir = null ) {
foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) {
$lang_file = basename($lang_file, '.mo');
if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) )
if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) &&
0 !== strpos( $lang_file, 'admin-' ))
$languages[] = $lang_file;
}