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
This commit is contained in:
nbachiyski 2010-05-29 20:35:19 +00:00
parent 37604414c4
commit 22342a502d
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@
* @subpackage Administration
*/
define( 'WP_NETWORK_ADMIN_PAGE', true );
/** WordPress Administration Bootstrap */
require_once( './admin.php' );

View File

@ -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" );
}
}