mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-30 20:21:37 +01:00
Because the WP_ADMIN
constant name can be bound in multiple files, all instances should check ! defined
first. wp-admin/admin.php
already has this check.
See #27881. Built from https://develop.svn.wordpress.org/trunk@28478 git-svn-id: http://core.svn.wordpress.org/trunk@28305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fc23dc3551
commit
112ca4e055
@ -14,7 +14,9 @@
|
||||
* @since 2.1.0
|
||||
*/
|
||||
define( 'DOING_AJAX', true );
|
||||
define( 'WP_ADMIN', true );
|
||||
if ( ! defined( 'WP_ADMIN' ) ) {
|
||||
define( 'WP_ADMIN', true );
|
||||
}
|
||||
|
||||
/** Load WordPress Bootstrap */
|
||||
require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
|
||||
|
@ -9,7 +9,9 @@
|
||||
*/
|
||||
|
||||
/** We are located in WordPress Administration Screens */
|
||||
define('WP_ADMIN', true);
|
||||
if ( ! defined( 'WP_ADMIN' ) ) {
|
||||
define( 'WP_ADMIN', true );
|
||||
}
|
||||
|
||||
if ( defined('ABSPATH') )
|
||||
require_once(ABSPATH . 'wp-load.php');
|
||||
|
@ -11,8 +11,9 @@
|
||||
*
|
||||
* @since 2.3.2
|
||||
*/
|
||||
if ( ! defined('WP_ADMIN') )
|
||||
define('WP_ADMIN', true);
|
||||
if ( ! defined( 'WP_ADMIN' ) ) {
|
||||
define( 'WP_ADMIN', true );
|
||||
}
|
||||
|
||||
if ( ! defined('WP_NETWORK_ADMIN') )
|
||||
define('WP_NETWORK_ADMIN', false);
|
||||
|
@ -10,7 +10,9 @@ if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action']
|
||||
define( 'DOING_AJAX', true );
|
||||
}
|
||||
|
||||
define('WP_ADMIN', true);
|
||||
if ( ! defined( 'WP_ADMIN' ) ) {
|
||||
define( 'WP_ADMIN', true );
|
||||
}
|
||||
|
||||
if ( defined('ABSPATH') )
|
||||
require_once(ABSPATH . 'wp-load.php');
|
||||
|
Loading…
Reference in New Issue
Block a user