mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 07:04:34 +00:00
Embeds: Add fallbacks for IE7-9.
Older IE versions need just that little bit of extra tender care to keep them going. Props peterwilsoncc, swissspidy, pento. Fixes #34204. git-svn-id: https://develop.svn.wordpress.org/trunk@35466 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -372,7 +372,6 @@ function wp_oembed_add_host_js() {
|
||||
wp_enqueue_script( 'wp-embed' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the URL to embed a specific post in an iframe.
|
||||
*
|
||||
@@ -863,6 +862,28 @@ function wp_embed_excerpt_attachment( $content ) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue embed iframe default CSS and JS & fire do_action('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().
|
||||
*
|
||||
* @since 4.4.0
|
||||
*/
|
||||
function enqueue_embed_scripts() {
|
||||
wp_enqueue_style( 'open-sans' );
|
||||
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' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints the CSS in the embed iframe header.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user