Script Loader: Use a global variable in wp_script_modules().
This brings the function more in line with its related `wp_scripts()` and `wp_styles()` functions and makes it easier to reset the class instance in tests. Props westonruter, luisherranz. See #56313. Built from https://develop.svn.wordpress.org/trunk@57503 git-svn-id: http://core.svn.wordpress.org/trunk@57004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -378,6 +378,8 @@ require ABSPATH . WPINC . '/class-wp-script-modules.php';
|
||||
require ABSPATH . WPINC . '/script-modules.php';
|
||||
require ABSPATH . WPINC . '/interactivity-api.php';
|
||||
|
||||
wp_script_modules()->add_hooks();
|
||||
|
||||
$GLOBALS['wp_embed'] = new WP_Embed();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user