Changeset 57287 for trunk/src/wp-includes/l10n.php
- Timestamp:
- 01/15/2024 07:03:27 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/l10n.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n.php
r57286 r57287 1399 1399 * @since 4.7.0 The results are now filterable with the {@see 'get_available_languages'} filter. 1400 1400 * 1401 * @global WP_Textdomain_Registry $wp_textdomain_registry WordPress Textdomain Registry. 1402 * 1401 1403 * @param string $dir A directory to search for language files. 1402 1404 * Default WP_LANG_DIR. … … 1405 1407 */ 1406 1408 function get_available_languages( $dir = null ) { 1409 global $wp_textdomain_registry; 1410 1407 1411 $languages = array(); 1408 1412 1409 $lang_files = glob( ( is_null( $dir ) ? WP_LANG_DIR : $dir ) . '/*.mo' ); 1413 $path = is_null( $dir ) ? WP_LANG_DIR : $dir; 1414 $lang_files = $wp_textdomain_registry->get_language_files_from_path( $path ); 1415 1410 1416 if ( $lang_files ) { 1411 1417 foreach ( $lang_files as $lang_file ) {
Note: See TracChangeset
for help on using the changeset viewer.