Changeset 18690
- Timestamp:
- 09/16/2011 11:12:37 AM (14 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
-
admin-bar.php (modified) (2 diffs)
-
class-wp-admin-bar.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r18687 r18690 56 56 return false; 57 57 58 $wp_admin_bar->load_user_locale_translations();59 60 58 do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) ); 61 59 … … 65 63 66 64 do_action( 'wp_after_admin_bar_render' ); 67 68 $wp_admin_bar->unload_user_locale_translations();69 65 } 70 66 add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); -
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.