From 1688cde0e2f44f8fb4929eb96d400961ece54c64 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Fri, 16 Sep 2011 11:12:37 +0000 Subject: [PATCH] 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 --- wp-includes/admin-bar.php | 4 ---- wp-includes/class-wp-admin-bar.php | 30 +----------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 1d6de3260f..ec2565890f 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -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 ); diff --git a/wp-includes/class-wp-admin-bar.php b/wp-includes/class-wp-admin-bar.php index 7ddac71c9c..5337dcebfc 100644 --- a/wp-includes/class-wp-admin-bar.php +++ b/wp-includes/class-wp-admin-bar.php @@ -1,8 +1,6 @@ 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; - */ - } } -?> +?> \ No newline at end of file