Changeset 18690 for trunk/wp-includes/class-wp-admin-bar.php
- Timestamp:
- 09/16/2011 11:12:37 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/class-wp-admin-bar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-admin-bar.php
r18688 r18690 1 1 <?php 2 2 class WP_Admin_Bar { 3 var $changed_locale = false;4 3 var $menu; 5 var $need_to_change_locale = false;6 4 var $proto = 'http://'; 7 5 var $user; … … 27 25 $this->user->account_domain = $this->user->domain; 28 26 } 29 $this->user->locale = get_locale();30 27 } 31 28 … … 209 206 return false; 210 207 } 211 212 // TODO: Convert to a core feature for multisite or remove213 function load_user_locale_translations() {214 $this->need_to_change_locale = ( get_locale() != $this->user->locale );215 if ( ! $this->need_to_change_locale )216 return;217 /*218 $this->previous_translations = get_translations_for_domain( 'default' );219 $this->adminbar_locale_filter = lambda( '$_', '$GLOBALS["wp_admin_bar"]->user->locale;' );220 unload_textdomain( 'default' );221 add_filter( 'locale', $this->adminbar_locale_filter );222 load_default_textdomain();223 $this->changed_locale = true;224 */225 }226 227 function unload_user_locale_translations() {228 global $l10n;229 if ( ! $this->changed_locale )230 return;231 /*232 remove_filter( 'locale', $this->adminbar_locale_filter );233 $l10n['default'] = &$this->previous_translations;234 */235 }236 208 } 237 209 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)