mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Add a todo. See #14772.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
717ef94b9b
commit
4699e8f58f
@ -200,12 +200,13 @@ class WP_Admin_Bar {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Convert to a core feature for multisite or remove
|
||||||
function load_user_locale_translations() {
|
function load_user_locale_translations() {
|
||||||
$this->need_to_change_locale = ( get_locale() != $this->user->locale );
|
$this->need_to_change_locale = ( get_locale() != $this->user->locale );
|
||||||
if ( ! $this->need_to_change_locale )
|
if ( ! $this->need_to_change_locale )
|
||||||
return;
|
return;
|
||||||
$this->previous_translations = get_translations_for_domain( 'default' );
|
$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' );
|
unload_textdomain( 'default' );
|
||||||
add_filter( 'locale', $this->adminbar_locale_filter );
|
add_filter( 'locale', $this->adminbar_locale_filter );
|
||||||
load_default_textdomain();
|
load_default_textdomain();
|
||||||
@ -216,7 +217,7 @@ class WP_Admin_Bar {
|
|||||||
global $l10n;
|
global $l10n;
|
||||||
if ( ! $this->changed_locale )
|
if ( ! $this->changed_locale )
|
||||||
return;
|
return;
|
||||||
remove_filter( 'locale', $this->adminbar_locale_filter );
|
//remove_filter( 'locale', $this->adminbar_locale_filter );
|
||||||
$l10n['default'] = &$this->previous_translations;
|
$l10n['default'] = &$this->previous_translations;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user