Changeset 53874 for trunk/src/wp-includes/class-wp-locale-switcher.php
- Timestamp:
- 08/11/2022 12:37:05 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-locale-switcher.php
r49566 r53874 197 197 198 198 foreach ( $domains as $domain ) { 199 // The default text domain is handled by `load_default_textdomain()`. 199 200 if ( 'default' === $domain ) { 200 201 continue; 201 202 } 202 203 203 unload_textdomain( $domain ); 204 // Unload current text domain but allow them to be reloaded 205 // after switching back or to another locale. 206 unload_textdomain( $domain, true ); 204 207 get_translations_for_domain( $domain ); 205 208 } … … 219 222 */ 220 223 private function change_locale( $locale ) { 221 // Reset translation availability information. 222 _get_path_to_translation( null, true ); 224 global $wp_locale; 223 225 224 226 $this->load_translations( $locale ); 225 227 226 $ GLOBALS['wp_locale']= new WP_Locale();228 $wp_locale = new WP_Locale(); 227 229 228 230 /**
Note: See TracChangeset
for help on using the changeset viewer.