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

git-svn-id: https://develop.svn.wordpress.org/trunk@18690 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2011-09-16 11:12:37 +00:00
parent af72ac6ff5
commit 1688cde0e2
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 ) )
return false;
$wp_admin_bar->load_user_locale_translations();
do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) );
do_action( 'wp_before_admin_bar_render' );
@ -64,8 +62,6 @@ function wp_admin_bar_render() {
$wp_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( 'admin_footer', 'wp_admin_bar_render', 1000 );

View File

@ -1,8 +1,6 @@
<?php
class WP_Admin_Bar {
var $changed_locale = false;
var $menu;
var $need_to_change_locale = false;
var $proto = 'http://';
var $user;
@ -26,7 +24,6 @@ class WP_Admin_Bar {
$this->user->domain = trailingslashit( home_url() );
$this->user->account_domain = $this->user->domain;
}
$this->user->locale = get_locale();
}
add_action( 'wp_head', 'wp_admin_bar_header' );
@ -208,30 +205,5 @@ class WP_Admin_Bar {
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;
*/
}
}
?>
?>