Script Loader: Add hooks for script modules and interactivity API only on `after_setup_theme`.
Ensures that `wp_is_block_theme()` is not called too early before the themes are fully setup. This addresses an issue where a parent theme was mistakenly marked as being missing. Props scruffian, youknowriad, swissspidy, poena, dennysdionigi, bgardner, westonruter. Fixes #60411. Built from https://develop.svn.wordpress.org/trunk@57661 git-svn-id: http://core.svn.wordpress.org/trunk@57162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b440a4f84f
commit
900aa7bf89
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-beta1-57660';
|
||||
$wp_version = '6.5-beta1-57661';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
@ -390,8 +390,8 @@ require ABSPATH . WPINC . '/interactivity-api/class-wp-interactivity-api-directi
|
|||
require ABSPATH . WPINC . '/interactivity-api/interactivity-api.php';
|
||||
require ABSPATH . WPINC . '/class-wp-plugin-dependencies.php';
|
||||
|
||||
wp_script_modules()->add_hooks();
|
||||
wp_interactivity()->add_hooks();
|
||||
add_action( 'after_setup_theme', array( wp_script_modules(), 'add_hooks' ) );
|
||||
add_action( 'after_setup_theme', array( wp_interactivity(), 'add_hooks' ) );
|
||||
|
||||
$GLOBALS['wp_embed'] = new WP_Embed();
|
||||
|
||||
|
|
Loading…
Reference in New Issue