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