enqueue_embed_scripts() WordPress Function

The enqueue_embed_scripts() function is used to enqueue the required scripts for the WP Embed feature. This function should be called from the wp_enqueue_scripts action.

enqueue_embed_scripts() #

Enqueues embed iframe default CSS and JS.


Description

Enqueue PNG fallback CSS for embed iframe for legacy versions of IE.

Allows plugins to queue scripts for the embed iframe end using wp_enqueue_script(). Runs first in oembed_head().


Top ↑

Source

File: wp-includes/embed.php

function enqueue_embed_scripts() {
	wp_enqueue_style( 'wp-embed-template-ie' );

	/**
	 * Fires when scripts and styles are enqueued for the embed iframe.
	 *
	 * @since 4.4.0
	 */
	do_action( 'enqueue_embed_scripts' );
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.