WordPress.org

Make WordPress Core

Changeset 28478


Ignore:
Timestamp:
05/18/2014 08:41:28 PM (7 years ago)
Author:
wonderboymusic
Message:

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.

Location:
trunk/src/wp-admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/admin-ajax.php

    r28358 r28478  
    1515 */
    1616define( 'DOING_AJAX', true );
    17 define( 'WP_ADMIN', true );
     17if ( ! defined( 'WP_ADMIN' ) ) {
     18    define( 'WP_ADMIN', true );
     19}
    1820
    1921/** Load WordPress Bootstrap */
  • trunk/src/wp-admin/admin-post.php

    r28394 r28478  
    1010
    1111/** We are located in WordPress Administration Screens */
    12 define('WP_ADMIN', true);
     12if ( ! defined( 'WP_ADMIN' ) ) {
     13    define( 'WP_ADMIN', true );
     14}
    1315
    1416if ( defined('ABSPATH') )
  • trunk/src/wp-admin/admin.php

    r28393 r28478  
    1212 * @since 2.3.2
    1313 */
    14 if ( ! defined('WP_ADMIN') )
    15     define('WP_ADMIN', true);
     14if ( ! defined( 'WP_ADMIN' ) ) {
     15    define( 'WP_ADMIN', true );
     16}
    1617
    1718if ( ! defined('WP_NETWORK_ADMIN') )
  • trunk/src/wp-admin/async-upload.php

    r27955 r28478  
    1111}
    1212
    13 define('WP_ADMIN', true);
     13if ( ! defined( 'WP_ADMIN' ) ) {
     14    define( 'WP_ADMIN', true );
     15}
    1416
    1517if ( defined('ABSPATH') )
Note: See TracChangeset for help on using the changeset viewer.