Changeset 7124
- Timestamp:
- 04/18/2018 08:27:13 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-locale-banner.php
r6340 r7124 69 69 $current_locale = get_locale(); 70 70 71 require_once GLOTPRESS_LOCALES_PATH; 72 73 // Validate the list of locales can be found by `wp_locale`. 74 $translated_locales = array_filter( $translated_locales, function( $locale ) { 75 return \GP_Locales::by_field( 'wp_locale', $locale ); 76 } ); 77 71 78 // Build a list of WordPress locales which we'll suggest to the user. 72 79 $suggest_locales = array_values( array_intersect( $locales_from_header, $translated_locales ) ); 73 80 $current_locale_is_suggested = in_array( $current_locale, $suggest_locales ); 74 81 $current_locale_is_translated = in_array( $current_locale, $translated_locales ); 75 76 require_once GLOTPRESS_LOCALES_PATH;77 82 78 83 // Get the native language names of the locales.
Note: See TracChangeset
for help on using the changeset viewer.