Make WordPress Core


Ignore:
Timestamp:
01/08/2007 12:11:06 AM (18 years ago)
Author:
ryan
Message:

Load locale specific php code in global context. fixes #3488

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/locale.php

    r4194 r4699  
    8888        $this->meridiem['PM'] = __('PM');
    8989
    90         $this->_load_locale_data();
    91     }
     90        // Import global locale vars set during inclusion of $locale.php.
     91        foreach ( $this->locale_vars as $var ) {
     92            if ( isset($GLOBALS[$var]) )
     93                $this->$var = $GLOBALS[$var];
     94        }
    9295
    93     function _load_locale_data() {
    94         $locale = get_locale();
    95         $locale_file = ABSPATH . "wp-includes/languages/$locale.php";
    96         if ( !file_exists($locale_file) )
    97             return;
    98 
    99         include($locale_file);
    100 
    101         foreach ( $this->locale_vars as $var ) {
    102             $this->$var = $$var;   
    103         }
    10496    }
    10597
Note: See TracChangeset for help on using the changeset viewer.