Make WordPress Core

Changeset 20788


Ignore:
Timestamp:
05/14/2012 05:58:06 PM (13 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r20648 r20788  
    541541    foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) {
    542542        $lang_file = basename($lang_file, '.mo');
    543         if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) )
     543        if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) &&
     544            0 !== strpos( $lang_file, 'admin-' ))
    544545            $languages[] = $lang_file;
    545546    }
Note: See TracChangeset for help on using the changeset viewer.