From a138374ec8e4034a70b8fcd6622e6f1fe1bfaf82 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Fri, 19 Aug 2016 04:10:30 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@38282 git-svn-id: http://core.svn.wordpress.org/trunk@38223 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/plugin.php | 2 ++ wp-includes/version.php | 2 +- wp-settings.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/plugin.php b/wp-includes/plugin.php index ca4985f1f0..bdb9ebd17d 100644 --- a/wp-includes/plugin.php +++ b/wp-includes/plugin.php @@ -14,6 +14,8 @@ * Also see the {@link https://codex.wordpress.org/Plugin_API Plugin API} for * more information and examples on how to use a lot of these functions. * + * This file should have no external dependencies. + * * @package WordPress * @subpackage Plugin * @since 1.5.0 diff --git a/wp-includes/version.php b/wp-includes/version.php index 80ec2472ce..d43e0bc31e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38281'; +$wp_version = '4.7-alpha-38282'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-settings.php b/wp-settings.php index dc3b25a7cb..7f136159c2 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -20,7 +20,7 @@ define( 'WPINC', 'wp-includes' ); // Include files required for initialization. require( ABSPATH . WPINC . '/load.php' ); require( ABSPATH . WPINC . '/default-constants.php' ); -require( ABSPATH . WPINC . '/plugin.php' ); +require_once( ABSPATH . WPINC . '/plugin.php' ); /* * These can't be directly globalized in version.php. When updating,