diff --git a/Gruntfile.js b/Gruntfile.js index b8dd5f8..29173b4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -233,7 +233,8 @@ module.exports = function(grunt) { // Exceptions '!wp-includes/css/dashicons.css', - '!wp-includes/css/wp-oembed-embed.css' + '!wp-includes/css/wp-oembed-embed.css', + '!wp-includes/css/wp-oembed-embed-ie.css' ] }, colors: { diff --git a/src/wp-includes/css/wp-oembed-embed-ie.css b/src/wp-includes/css/wp-oembed-embed-ie.css new file mode 100644 index 0000000..dca8c07 --- /dev/null +++ b/src/wp-includes/css/wp-oembed-embed-ie.css @@ -0,0 +1,38 @@ +/* Dashicons */ +.dashicons { + *display: inline; + *zoom: 1; +} + +.dashicons-no { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAQAAAAngNWGAAAAcElEQVR4AdXRVxmEMBAGwJMQCUhAIhKQECmRsFJwMFfp7HfP/E8pk0173CuKpt/0R+WaBaaZqogLagBMuh+DdoKbyRCwqZ/SnM0R5oQuZ2UHS8Z6k23qPxZCTrV5UlHMi8bsfHVXP7K/GXZHaTO7S54CWLdHlN2YIwAAAABJRU5ErkJggg==); + *background-image: url(../images/embed/close.png); +} + +.dashicons-admin-comments { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAATUlEQVR4AWMYWqCpvUcAiA8A8X9iMFStAD4DG0AKScQNVDZw1MBRAwvIMLCA5jmFlCD4AMQGlOTtBgoNwzQQ3TCKDaTcMMxYN2AYVgAAYPKsEBxN0PIAAAAASUVORK5CYII=); + *background-image: url(../images/embed/comment.png); + *background-position: 0 0; +} + +.wp-embed-comments a:hover .dashicons-admin-comments { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAATElEQVR4AWMYYqB4lQAQHwDi/8RgqFoBfAY2gBSSiBuobOCogaMGFpBhYAEdcwrhIPgAxAaU5O0GCg3DNBDdMIoNpNwwzFg3YBhWAABG71qAFYcFqgAAAABJRU5ErkJggg==); + *background-image: url(../images/embed/comment.png); + *background-position: 0 -40px; +} + +.dashicons-share { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAc0lEQVR4AWMYfqCpvccAiBcA8X8gfgDEBZQaeAFkGBoOoMR1/7HgDeQa2ECZgQiDHID4AMwAor0MCmBoQP+HBnwAskFQdgBRkQJViGk7wiAHUr21AYdhDTA1dDOQHl6mPFLokmwoT9j0z3qUFw70L77oDwAiuzCIub1XpQAAAABJRU5ErkJggg==); + *background-image: url(../images/embed/share.png); + *background-position: 0 0; +} + +.wp-embed-share-dialog-open:hover .dashicons-share { + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAc0lEQVR4AWMYhqB4lQEQLwDi/0D8AIgLKDXwAsgwNBxAiev+Y8EbyDWwgTIDEQY5APEBmAFEexkUwNCA/g8N+ABkg6DsAKIiBaoQ03aEQQ6kemsDDsMaYEroZiA9vEx5pNAl2VCesOmf9SgvHOhffNEfAAAMqPR5IEZH5wAAAABJRU5ErkJggg==); + *background-image: url(../images/embed/share.png); + *background-position: 0 -40px; +} + +.wp-embed-share-dialog { + *background-color: #222; +} \ No newline at end of file diff --git a/src/wp-includes/css/wp-oembed-embed.css b/src/wp-includes/css/wp-oembed-embed.css index 9ea586b..20c9a6e 100644 --- a/src/wp-includes/css/wp-oembed-embed.css +++ b/src/wp-includes/css/wp-oembed-embed.css @@ -19,6 +19,8 @@ body { /* Dashicons */ .dashicons { display: inline-block; + *display: inline; + *zoom: 1; width: 20px; height: 20px; background-color: transparent; @@ -139,12 +141,16 @@ p.wp-embed-heading { .wp-embed-site-title a { position: relative; display: inline-block; + *display: inline; + *zoom: 1; padding-left: 35px; } .wp-embed-site-title, .wp-embed-meta { display: table-cell; + *display: inline; + *zoom: 1; } .wp-embed-meta { @@ -156,6 +162,7 @@ p.wp-embed-heading { .wp-embed-comments, .wp-embed-share { display: inline; + *zoom: 1; } .wp-embed-meta a:hover { @@ -166,6 +173,8 @@ p.wp-embed-heading { .wp-embed-comments a { line-height: 25px; display: inline-block; + *display: inline; + *zoom: 1; } .wp-embed-comments + .wp-embed-share { @@ -178,6 +187,7 @@ p.wp-embed-heading { left: 0; right: 0; bottom: 0; + background-color: #222; background-color: rgba(10, 10, 10, 0.9); color: #fff; opacity: 1; @@ -254,7 +264,9 @@ p.wp-embed-heading { } .wp-embed-share-tab-button { - display: inline; + display: inline-block; + *display: inline; + *zoom: 1; } .wp-embed-share-tab-button button { diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 8bdebe5..44c5a1f 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -444,6 +444,7 @@ add_action( 'parse_query', 'wp_oembed_parse_query' ); add_action( 'wp_head', 'wp_oembed_add_discovery_links' ); add_action( 'wp_head', 'wp_oembed_add_host_js' ); +add_action( 'oembed_head', 'wp_oembed_enqueue_scripts', 1 ); add_action( 'oembed_head', 'print_emoji_detection_script' ); add_action( 'oembed_head', 'print_emoji_styles' ); add_action( 'oembed_head', 'print_oembed_embed_styles' ); diff --git a/src/wp-includes/embed-functions.php b/src/wp-includes/embed-functions.php index 094d8cd..066db33 100644 --- a/src/wp-includes/embed-functions.php +++ b/src/wp-includes/embed-functions.php @@ -802,6 +802,27 @@ function wp_oembed_excerpt_attachment( $content ) { } /** + * Enqueue embed iframe default CSS and JS & fire do_action('wp_oembed_enqueue_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 wp_oembed_enqueue_scripts() { + wp_enqueue_style( 'open-sans' ); + wp_enqueue_style( 'wp-oembed-embed-ie' ); + /** + * Fires when scripts and styles are enqueued for the embed iframe. + * + * @since 4.4.0 + */ + do_action( 'wp_oembed_enqueue_scripts' ); +} + +/** * Prints the CSS in the embed iframe header. * * @since 4.4.0 diff --git a/src/wp-includes/embed-template.php b/src/wp-includes/embed-template.php index 7a70b1d..cb6729f 100644 --- a/src/wp-includes/embed-template.php +++ b/src/wp-includes/embed-template.php @@ -14,8 +14,6 @@ if ( ! headers_sent() ) { header( 'X-WP-oembed: true' ); } -wp_enqueue_style( 'open-sans' ); - ?> > @@ -170,17 +168,18 @@ if ( have_posts() ) :
-
-