WordPress.org

Make WordPress Core

Changeset 18690


Ignore:
Timestamp:
09/16/11 11:12:37 (3 years ago)
Author:
westi
Message:

Remove the unimplemented user locale code in the admin bar until we actually implement it for real.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r18687 r18690  
    5656        return false; 
    5757 
    58     $wp_admin_bar->load_user_locale_translations(); 
    59  
    6058    do_action_ref_array( 'admin_bar_menu', array( &$wp_admin_bar ) ); 
    6159 
     
    6563 
    6664    do_action( 'wp_after_admin_bar_render' ); 
    67  
    68     $wp_admin_bar->unload_user_locale_translations(); 
    6965} 
    7066add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); 
  • trunk/wp-includes/class-wp-admin-bar.php

    r18688 r18690  
    11<?php 
    22class WP_Admin_Bar { 
    3     var $changed_locale = false; 
    43    var $menu; 
    5     var $need_to_change_locale = false; 
    64    var $proto = 'http://'; 
    75    var $user; 
     
    2725                $this->user->account_domain = $this->user->domain; 
    2826            } 
    29             $this->user->locale = get_locale(); 
    3027        } 
    3128 
     
    209206        return false; 
    210207    } 
    211  
    212     // TODO: Convert to a core feature for multisite or remove 
    213     function load_user_locale_translations() { 
    214         $this->need_to_change_locale = ( get_locale() != $this->user->locale ); 
    215         if ( ! $this->need_to_change_locale ) 
    216             return; 
    217         /* 
    218         $this->previous_translations = get_translations_for_domain( 'default' ); 
    219         $this->adminbar_locale_filter = lambda( '$_', '$GLOBALS["wp_admin_bar"]->user->locale;' ); 
    220         unload_textdomain( 'default' ); 
    221         add_filter( 'locale', $this->adminbar_locale_filter ); 
    222         load_default_textdomain(); 
    223         $this->changed_locale = true; 
    224         */ 
    225     } 
    226  
    227     function unload_user_locale_translations() { 
    228         global $l10n; 
    229         if ( ! $this->changed_locale ) 
    230             return; 
    231         /* 
    232         remove_filter( 'locale', $this->adminbar_locale_filter ); 
    233         $l10n['default'] = &$this->previous_translations; 
    234         */ 
    235     } 
    236208} 
    237209?> 
Note: See TracChangeset for help on using the changeset viewer.