Make WordPress Core

Changeset 38282


Ignore:
Timestamp:
08/19/2016 04:09:55 AM (8 years ago)
Author:
jorbin
Message:

Bootstrap/Load: Include Plugin API via require_once

Currently, auto-prepended files need to directly modify the globals in order to add filters and actions. This is a bad idea. Globals are bad. You should never directly interact with the Plugin globals.

Fixes #37707.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r38251 r38282  
    1414 * Also see the {@link https://codex.wordpress.org/Plugin_API Plugin API} for
    1515 * more information and examples on how to use a lot of these functions.
     16 *
     17 * This file should have no external dependencies.
    1618 *
    1719 * @package WordPress
  • trunk/src/wp-settings.php

    r38251 r38282  
    2121require( ABSPATH . WPINC . '/load.php' );
    2222require( ABSPATH . WPINC . '/default-constants.php' );
    23 require( ABSPATH . WPINC . '/plugin.php' );
     23require_once( ABSPATH . WPINC . '/plugin.php' );
    2424
    2525/*
Note: See TracChangeset for help on using the changeset viewer.