From 22342a502d1bbd32be7ea54eeb14c6a63d6d5f34 Mon Sep 17 00:00:00 2001 From: nbachiyski Date: Sat, 29 May 2010 20:35:19 +0000 Subject: [PATCH] Better detection whether we are on the Network page. Use custom constant to tell us. See #13565, props nacin We used to load multisite translations each time WP_ALLOW_MULTISITE was defined, but it could lead to alot of false positives. Generic config files can include to allow users to updgrade to multisite without further editing the config file. git-svn-id: http://svn.automattic.com/wordpress/trunk@15064 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network.php | 2 ++ wp-includes/l10n.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/network.php b/wp-admin/network.php index cd277a5cd..3cf02ce56 100644 --- a/wp-admin/network.php +++ b/wp-admin/network.php @@ -10,6 +10,8 @@ * @subpackage Administration */ +define( 'WP_NETWORK_ADMIN_PAGE', true ); + /** WordPress Administration Bootstrap */ require_once( './admin.php' ); diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index f5dc9265b..1ad9499b8 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -367,7 +367,7 @@ function load_default_textdomain() { load_textdomain( 'default', WP_LANG_DIR . "/$locale.mo" ); - if ( is_multisite() || ( defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) ) { + if ( is_multisite() || ( defined( 'WP_NETWORK_ADMIN_PAGE' ) && WP_NETWORK_ADMIN_PAGE ) ) { load_textdomain( 'default', WP_LANG_DIR . "/ms-$locale.mo" ); } }