WordPress.org

Make WordPress Core

Changeset 19772


Ignore:
Timestamp:
01/27/12 22:19:56 (3 years ago)
Author:
ryan
Message:

Load the new admin and network admin mo files, if present. see #19852

Location:
trunk
Files:
2 edited

Legend:

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

    r19712 r19772  
    66 * @subpackage Administration 
    77 */ 
     8 
     9if ( ! defined('WP_ADMIN') ) { 
     10    // This file is being included from a file other than wp-admin/admin.php, so 
     11    // some setup was skipped. Make sure the admin message catalog is loaded since 
     12    // load_default_textdomain() will not have done so in this context. 
     13    load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale() . '.mo' ); 
     14} 
    815 
    916/** WordPress Bookmark Administration API */ 
  • trunk/wp-includes/l10n.php

    r19059 r19772  
    383383    load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" ); 
    384384 
    385     if ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) { 
     385    if ( ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists(  WP_LANG_DIR . "/admin-$locale.mo" ) ) { 
    386386        load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" ); 
    387     } 
     387        return; 
     388    } 
     389 
     390    if ( is_admin()  ) 
     391        load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" ); 
     392 
     393    if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) 
     394        load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" ); 
     395 
    388396} 
    389397 
Note: See TracChangeset for help on using the changeset viewer.