mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Load the new admin and network admin mo files, if present. see #19852
git-svn-id: http://svn.automattic.com/wordpress/trunk@19772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
017f5e4aeb
commit
b2d61dab8a
@ -6,6 +6,13 @@
|
|||||||
* @subpackage Administration
|
* @subpackage Administration
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ( ! defined('WP_ADMIN') ) {
|
||||||
|
// This file is being included from a file other than wp-admin/admin.php, so
|
||||||
|
// some setup was skipped. Make sure the admin message catalog is loaded since
|
||||||
|
// load_default_textdomain() will not have done so in this context.
|
||||||
|
load_textdomain( 'default', WP_LANG_DIR . '/admin-' . get_locale() . '.mo' );
|
||||||
|
}
|
||||||
|
|
||||||
/** WordPress Bookmark Administration API */
|
/** WordPress Bookmark Administration API */
|
||||||
require_once(ABSPATH . 'wp-admin/includes/bookmark.php');
|
require_once(ABSPATH . 'wp-admin/includes/bookmark.php');
|
||||||
|
|
||||||
|
@ -382,9 +382,17 @@ function load_default_textdomain() {
|
|||||||
|
|
||||||
load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" );
|
load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" );
|
||||||
|
|
||||||
if ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) {
|
if ( ( is_multisite() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) ) && ! file_exists( WP_LANG_DIR . "/admin-$locale.mo" ) ) {
|
||||||
load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" );
|
load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" );
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( is_admin() )
|
||||||
|
load_textdomain( 'default', WP_LANG_DIR . "/admin-$locale.mo" );
|
||||||
|
|
||||||
|
if ( is_network_admin() || ( defined( 'WP_INSTALLING_NETWORK' ) && WP_INSTALLING_NETWORK ) )
|
||||||
|
load_textdomain( 'default', WP_LANG_DIR . "/admin-network-$locale.mo" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user