enqueue_embed_scripts

Enqueue embed iframe default CSS and JS & fire do_action('enqueue_embed_scripts').

Description

enqueue_embed_scripts(); 

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().


Usage

  1. if ( !function_exists( 'enqueue_embed_scripts' ) ) { 
  2. require_once ABSPATH . WPINC . '/embed.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = enqueue_embed_scripts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/embed.php  
  1. function enqueue_embed_scripts() { 
  2. wp_enqueue_style( 'wp-embed-template-ie' ); 
  3.  
  4. /** 
  5. * Fires when scripts and styles are enqueued for the embed iframe. 
  6. * @since 4.4.0 
  7. */