Remove the unimplemented user locale code in the admin bar until we actually implement it for real.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2011-09-16 11:12:37 +00:00
parent 0b4bd67034
commit 34dbc01722
2 changed files with 1 additions and 33 deletions

View File

@ -55,8 +55,6 @@ function wp_admin_bar_render() {
if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) ) if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) )
return false; return false;
$wp_admin_bar->load_user_locale_translations();
do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) ); do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) );
do_action( 'wp_before_admin_bar_render' ); do_action( 'wp_before_admin_bar_render' );
@ -64,8 +62,6 @@ function wp_admin_bar_render() {
$wp_admin_bar->render(); $wp_admin_bar->render();
do_action( 'wp_after_admin_bar_render' ); do_action( 'wp_after_admin_bar_render' );
$wp_admin_bar->unload_user_locale_translations();
} }
add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
add_action( 'admin_footer', 'wp_admin_bar_render', 1000 ); add_action( 'admin_footer', 'wp_admin_bar_render', 1000 );

View File

@ -1,8 +1,6 @@
<?php <?php
class WP_Admin_Bar { class WP_Admin_Bar {
var $changed_locale = false;
var $menu; var $menu;
var $need_to_change_locale = false;
var $proto = 'http://'; var $proto = 'http://';
var $user; var $user;
@ -26,7 +24,6 @@ class WP_Admin_Bar {
$this->user->domain = trailingslashit( home_url() ); $this->user->domain = trailingslashit( home_url() );
$this->user->account_domain = $this->user->domain; $this->user->account_domain = $this->user->domain;
} }
$this->user->locale = get_locale();
} }
add_action( 'wp_head', 'wp_admin_bar_header' ); add_action( 'wp_head', 'wp_admin_bar_header' );
@ -208,30 +205,5 @@ class WP_Admin_Bar {
return false; return false;
} }
// TODO: Convert to a core feature for multisite or remove
function load_user_locale_translations() {
$this->need_to_change_locale = ( get_locale() != $this->user->locale );
if ( ! $this->need_to_change_locale )
return;
/*
$this->previous_translations = get_translations_for_domain( 'default' );
$this->adminbar_locale_filter = lambda( '$_', '$GLOBALS["wp_admin_bar"]->user->locale;' );
unload_textdomain( 'default' );
add_filter( 'locale', $this->adminbar_locale_filter );
load_default_textdomain();
$this->changed_locale = true;
*/
}
function unload_user_locale_translations() {
global $l10n;
if ( ! $this->changed_locale )
return;
/*
remove_filter( 'locale', $this->adminbar_locale_filter );
$l10n['default'] = &$this->previous_translations;
*/
}
} }
?> ?>