Add a todo. See #14772.

git-svn-id: https://develop.svn.wordpress.org/trunk@16044 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2010-10-28 12:01:44 +00:00
parent c0c3167621
commit 6fd3027f4e
1 changed files with 3 additions and 2 deletions

View File

@ -200,12 +200,13 @@ 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;' );
//$this->adminbar_locale_filter = lambda( '$_', '$GLOBALS["wp_admin_bar"]->user->locale;' );
unload_textdomain( 'default' );
add_filter( 'locale', $this->adminbar_locale_filter );
load_default_textdomain();
@ -216,7 +217,7 @@ class WP_Admin_Bar {
global $l10n;
if ( ! $this->changed_locale )
return;
remove_filter( 'locale', $this->adminbar_locale_filter );
//remove_filter( 'locale', $this->adminbar_locale_filter );
$l10n['default'] = &$this->previous_translations;
}
}