Changeset 16039
- Timestamp:
- 10/28/2010 08:35:55 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar/admin-bar-class.php
r16038 r16039 201 201 return false; 202 202 } 203 204 function load_user_locale_translations() {205 $this->need_to_change_locale = ( get_locale() != $this->user->locale );206 if ( ! $this->need_to_change_locale )207 return;208 $this->previous_translations = get_translations_for_domain( 'default' );209 $this->adminbar_locale_filter = lambda( '$_', '$GLOBALS["wp_admin_bar"]->user->locale;' );210 unload_textdomain( 'default' );211 add_filter( 'locale', $this->adminbar_locale_filter );212 load_default_textdomain();213 $this->changed_locale = true;214 }215 216 function unload_user_locale_translations() {217 global $l10n;218 if ( ! $this->changed_locale )219 return;220 remove_filter( 'locale', $this->adminbar_locale_filter );221 $l10n['default'] = &$this->previous_translations;222 }223 203 } 224 204 ?>
Note: See TracChangeset
for help on using the changeset viewer.