From f6b643e9714552c5aa4948d16dc6be5074a7c91a Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 14 May 2012 17:58:06 +0000 Subject: [PATCH] Exclude admin pot files when calculating the list of installed languages in get_available_languages(). fixes #20676 git-svn-id: http://core.svn.wordpress.org/trunk@20788 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index e1b0d5c356..851b3730f7 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -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; }