Make WordPress Core


Ignore:
Timestamp:
10/31/2015 04:37:41 AM (9 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/embed-functions.php

    r35437 r35466  
    372372    wp_enqueue_script( 'wp-embed' );
    373373}
    374 
    375374
    376375/**
     
    862861
    863862    return $content;
     863}
     864
     865/**
     866 * Enqueue embed iframe default CSS and JS & fire do_action('enqueue_embed_scripts')
     867 *
     868 * Enqueue PNG fallback CSS for embed iframe for legacy versions of IE.
     869 *
     870 * Allows plugins to queue scripts for the embed iframe end using wp_enqueue_script().
     871 * Runs first in oembed_head().
     872 *
     873 * @since 4.4.0
     874 */
     875function enqueue_embed_scripts() {
     876    wp_enqueue_style( 'open-sans' );
     877    wp_enqueue_style( 'wp-embed-template-ie' );
     878
     879    /**
     880     * Fires when scripts and styles are enqueued for the embed iframe.
     881     *
     882     * @since 4.4.0
     883     */
     884    do_action( 'enqueue_embed_scripts' );
    864885}
    865886
Note: See TracChangeset for help on using the changeset viewer.