wordpress-develop/tests/phpunit/tests/oembed
Jb Audras 107050f7a3 Embeds: Fix oEmbed host script enqueueing on block-based themes.
This change fixes oEmbed host script enqueueing on front-end when using block themes.

It deprecates `wp_oembed_add_host_js` in favor of `wp_maybe_enqueue_oembed_host_js`. The action is still triggered in `default-filters.php` to ensure backward compatibility for websites that are removing the action. There is now a `has_action()` check in `wp_maybe_enqueue_oembed_host_js()` to see if `wp_oembed_add_host_js()` has not been unhooked from running at the `wp_head` action.

Follow-up to [52132], [52151], [52153], [52325].

Props swissspidy, westonruter, flixos90, kafleg.
Fixes #44632.


git-svn-id: https://develop.svn.wordpress.org/trunk@52437 602fd350-edb4-49c9-b593-d223f7449a82
2022-01-04 15:22:40 +00:00
..
controller.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
discovery.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
filterResult.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
filterTitleAttributes.php Tests: Update third-party video URLs in unit tests with more permanent videos. 2020-10-10 01:37:18 +00:00
getResponseData.php Embeds: Conditionally enqueue wp-embed only if needed and send ready message in case script loads after post embed windows. 2021-11-11 02:47:10 +00:00
headers.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
postEmbedUrl.php Coding Standards: Add visibility to methods in tests/phpunit/tests/. 2021-11-04 15:22:47 +00:00
template.php Embeds: Fix oEmbed host script enqueueing on block-based themes. 2022-01-04 15:22:40 +00:00
WpEmbed.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00
wpOembed.php Build/Test Tools: Implement use of the void solution. 2021-08-07 10:29:41 +00:00