Make WordPress Core


Ignore:
Timestamp:
04/05/2019 03:52:39 PM (7 years ago)
Author:
flixos90
Message:

Bootstrap/Load: Do not redefine constants because tests don't like it.

See #46045.

File:
1 edited

Legend:

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

    r45115 r45116  
    636636        wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
    637637        $_wp_plugin_file = $plugin;
    638         define( 'WP_SANDBOX_SCRAPING', true );
     638        if ( ! defined( 'WP_SANDBOX_SCRAPING' ) ) {
     639            define( 'WP_SANDBOX_SCRAPING', true );
     640        }
    639641        include_once( WP_PLUGIN_DIR . '/' . $plugin );
    640642        $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
     
    21332135 */
    21342136function plugin_sandbox_scrape( $plugin ) {
    2135     define( 'WP_SANDBOX_SCRAPING', true );
     2137    if ( ! defined( 'WP_SANDBOX_SCRAPING' ) ) {
     2138        define( 'WP_SANDBOX_SCRAPING', true );
     2139    }
    21362140    wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
    21372141    include( WP_PLUGIN_DIR . '/' . $plugin );
Note: See TracChangeset for help on using the changeset viewer.