wp_maybe_enqueue_oembed_host_js
wp_maybe_enqueue_oembed_host_js ( $html )
Parameters:- (string) html Embed markup.
Returns:- (string) Embed markup (without modifications).
Defined at: - Introduced in WordPress: 5.9.0
- Deprecated in WordPress: —
Description
Enqueue the wp-embed script if the provided oEmbed HTML contains a post embed.In order to only enqueue the wp-embed script on pages that actually contain post embeds, this function checks if the
provided HTML contains post embed markup and if so enqueues the script so that it will get printed in the footer.