Embed: `wp-settings.php` loads `class-wp-embed.php`, which currently produces side effects. Move the `global` instantiation to `wp-settings.php`. `WP_Embed` is then in a file by itself.

See #37827.

Built from https://develop.svn.wordpress.org/trunk@38362


git-svn-id: http://core.svn.wordpress.org/trunk@38303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2016-08-26 09:53:28 +00:00
parent ff59281441
commit b144d69ba0
3 changed files with 3 additions and 2 deletions

View File

@ -384,4 +384,3 @@ class WP_Embed {
return apply_filters( 'embed_maybe_make_link', $output, $url );
}
}
$GLOBALS['wp_embed'] = new WP_Embed();

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38361';
$wp_version = '4.7-alpha-38362';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -214,6 +214,8 @@ require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
$GLOBALS['wp_embed'] = new WP_Embed();
// Load multisite-specific files.
if ( is_multisite() ) {
require( ABSPATH . WPINC . '/ms-functions.php' );