### Eclipse Workspace Patch 1.0
#P wordpress-trunk bare
|
|
|
|
| 208 | 208 | return false; |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | | // TODO: Convert to a core feature for multisite or remove |
| 212 | 211 | function load_user_locale_translations() { |
| 213 | 212 | $this->need_to_change_locale = ( get_locale() != $this->user->locale ); |
| 214 | 213 | if ( ! $this->need_to_change_locale ) |
| 215 | 214 | return; |
| 216 | | /* |
| 217 | | $this->previous_translations = get_translations_for_domain( 'default' ); |
| 218 | | $this->adminbar_locale_filter = lambda( '$_', '$GLOBALS["wp_admin_bar"]->user->locale;' ); |
| 219 | | unload_textdomain( 'default' ); |
| 220 | | add_filter( 'locale', $this->adminbar_locale_filter ); |
| 221 | | load_default_textdomain(); |
| 222 | | $this->changed_locale = true; |
| 223 | | */ |
| 224 | 215 | } |
| 225 | 216 | |
| 226 | 217 | function unload_user_locale_translations() { |
| 227 | 218 | global $l10n; |
| 228 | 219 | if ( ! $this->changed_locale ) |
| 229 | 220 | return; |
| 230 | | /* |
| 231 | | remove_filter( 'locale', $this->adminbar_locale_filter ); |
| 232 | | $l10n['default'] = &$this->previous_translations; |
| 233 | | */ |
| 234 | 221 | } |
| 235 | 222 | } |
| 236 | 223 | ?> |