print_embed_scripts() WordPress Function

This function prints the scripts needed to embed media from popular social media sites. It includes the necessary Javascript and HTML for sites like YouTube, Vimeo, and Instagram. This function should be called from the wp_footer() hook.

print_embed_scripts() #

Prints the JavaScript in the embed iframe header.


Source

File: wp-includes/embed.php

function print_embed_scripts() {
	wp_print_inline_script_tag(
		file_get_contents( ABSPATH . WPINC . '/js/wp-embed-template' . wp_scripts_get_suffix() . '.js' )
	);
}


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.