Files
wordpress/wp-includes
audrasjb cdafa716f7 Script Loader: Allow for wp_register_script() to be called after wp_enqueue_script().
When a plugin registers styles/scripts on `wp_enqueue_scripts` (as plugin authors are encouraged to do), and conditionally enqueues their script/style on `the_content` filter, things "just work". In block themes, `the_content` is run prior to the header being processed, which results in the above scenario failing.

This change makes a `wp_enqueue_script( 'example' ); wp_register_script( 'example' );` work, where as currently the enqueue silently fails (no "doing it wrong" message) and the following register has no impact. Scripts can therefore be enqueued and dequeued (by "handle") before they are registered.

Fixes #54529.

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


git-svn-id: http://core.svn.wordpress.org/trunk@51930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-12-07 17:46:01 +00:00
..
2021-12-06 06:20:27 +00:00
2021-12-06 06:20:27 +00:00
2021-12-06 06:20:27 +00:00
2021-12-06 06:20:27 +00:00
2021-12-06 21:30:03 +00:00
2021-11-30 00:24:27 +00:00