Changeset 57516 for trunk/src/wp-includes/l10n.php
- Timestamp:
- 02/01/2024 07:03:55 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/l10n.php
r57350 r57516 790 790 $mofile = apply_filters( 'load_textdomain_mofile', $mofile, $domain ); 791 791 792 if ( ! is_readable( $mofile ) ) {793 return false;794 }795 796 792 if ( ! $locale ) { 797 793 $locale = determine_locale(); … … 818 814 } 819 815 820 $translation_files = array( $mofile ); 816 $translation_files = array(); 817 821 818 if ( 'mo' !== $preferred_format ) { 822 array_unshift( 823 $translation_files, 824 substr_replace( $mofile, ".l10n.$preferred_format", - strlen( '.mo' ) ) 825 ); 826 } 819 $translation_files[] = substr_replace( $mofile, ".l10n.$preferred_format", - strlen( '.mo' ) ); 820 } 821 822 $translation_files[] = $mofile; 827 823 828 824 foreach ( $translation_files as $file ) { … … 858 854 } 859 855 860 return true;856 return false; 861 857 } 862 858
Note: See TracChangeset
for help on using the changeset viewer.