WordPress.org

Make WordPress Core

Ticket #13706: filter-ms.3.patch

File filter-ms.3.patch, 668 bytes (added by ocean90, 5 years ago)

check only the basename

  • wp-includes/l10n.php

     
    511511        $languages = array(); 
    512512 
    513513        foreach( (array)glob( ( is_null( $dir) ? WP_LANG_DIR : $dir ) . '/*.mo' ) as $lang_file ) { 
    514                 if ( false === strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) ) 
    515                         $languages[] = basename($lang_file, '.mo'); 
     514                $lang_file = basename($lang_file, '.mo'); 
     515                if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) ) 
     516                        $languages[] = $lang_file; 
    516517        } 
    517518 
    518519        return $languages;