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.


git-svn-id: https://develop.svn.wordpress.org/trunk@38362 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2016-08-26 09:52:18 +00:00
parent 1ff3356d22
commit 1b292c965a
2 changed files with 2 additions and 1 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

@ -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' );