Ticket #1850: meta-1850.patch
File meta-1850.patch, 1.2 KB (added by , 8 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-locale-banner.php
68 68 $current_locale = get_locale(); 69 69 70 70 // Build a list of WordPress locales which we'll suggest to the user. 71 $suggest_locales = array_values( array_intersect( $ translated_locales, $locales_from_header) );71 $suggest_locales = array_values( array_intersect( $locales_from_header, $translated_locales ) ); 72 72 $current_locale_is_suggested = in_array( $current_locale, $suggest_locales ); 73 73 $current_locale_is_translated = in_array( $current_locale, $translated_locales ); 74 74 … … 262 262 } 263 263 264 264 foreach ( $available_locales as $locale ) { 265 list( $l ang, ) = preg_split( '/[_-]/', $locale );266 if ( $lang ) {265 list( $locale_lang, ) = preg_split( '/[_-]/', $locale ); 266 if ( $lang === $locale_lang ) { 267 267 return $locale; 268 268 } 269 269 }