Ticket #34204: 34204.9.diff
File 34204.9.diff, 11.1 KB (added by , 9 years ago) |
---|
-
Gruntfile.js
diff --git a/Gruntfile.js b/Gruntfile.js index 9038f55..696d2d9 100644
a b module.exports = function(grunt) { 233 233 234 234 // Exceptions 235 235 '!wp-includes/css/dashicons.css', 236 '!wp-includes/css/wp-embed-template.css' 236 '!wp-includes/css/wp-embed-template.css', 237 '!wp-includes/css/wp-embed-template-ie.css' 237 238 ] 238 239 }, 239 240 colors: { -
new file src/wp-includes/css/wp-embed-template-ie.css
diff --git a/src/wp-includes/css/wp-embed-template-ie.css b/src/wp-includes/css/wp-embed-template-ie.css new file mode 100644 index 0000000..0b721e6
- + 1 .dashicons-no { 2 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAQAAAAngNWGAAAAcElEQVR4AdXRVxmEMBAGwJMQCUhAIhKQECmRsFJwMFfp7HfP/E8pk0173CuKpt/0R+WaBaaZqogLagBMuh+DdoKbyRCwqZ/SnM0R5oQuZ2UHS8Z6k23qPxZCTrV5UlHMi8bsfHVXP7K/GXZHaTO7S54CWLdHlN2YIwAAAABJRU5ErkJggg==); 3 } 4 5 .dashicons-admin-comments { 6 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAATUlEQVR4AWMYWqCpvUcAiA8A8X9iMFStAD4DG0AKScQNVDZw1MBRAwvIMLCA5jmFlCD4AMQGlOTtBgoNwzQQ3TCKDaTcMMxYN2AYVgAAYPKsEBxN0PIAAAAASUVORK5CYII=); 7 } 8 9 .wp-embed-comments a:hover .dashicons-admin-comments { 10 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAATElEQVR4AWMYYqB4lQAQHwDi/8RgqFoBfAY2gBSSiBuobOCogaMGFpBhYAEdcwrhIPgAxAaU5O0GCg3DNBDdMIoNpNwwzFg3YBhWAABG71qAFYcFqgAAAABJRU5ErkJggg==); 11 } 12 13 .dashicons-share { 14 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAc0lEQVR4AWMYfqCpvccAiBcA8X8gfgDEBZQaeAFkGBoOoMR1/7HgDeQa2ECZgQiDHID4AMwAor0MCmBoQP+HBnwAskFQdgBRkQJViGk7wiAHUr21AYdhDTA1dDOQHl6mPFLokmwoT9j0z3qUFw70L77oDwAiuzCIub1XpQAAAABJRU5ErkJggg==); 15 } 16 17 .wp-embed-share-dialog-open:hover .dashicons-share { 18 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAc0lEQVR4AWMYhqB4lQEQLwDi/0D8AIgLKDXwAsgwNBxAiev+Y8EbyDWwgTIDEQY5APEBmAFEexkUwNCA/g8N+ABkg6DsAKIiBaoQ03aEQQ6kemsDDsMaYEroZiA9vEx5pNAl2VCesOmf9SgvHOhffNEfAAAMqPR5IEZH5wAAAABJRU5ErkJggg==); 19 } 20 No newline at end of file -
src/wp-includes/css/wp-embed-template.css
diff --git a/src/wp-includes/css/wp-embed-template.css b/src/wp-includes/css/wp-embed-template.css index 9ea586b..d91bdb6 100644
a b body { 46 46 47 47 .dashicons-share { 48 48 background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.5%2012q1.24%200%202.12.88T17.5%2015t-.88%202.12-2.12.88-2.12-.88T11.5%2015q0-.34.09-.69l-4.38-2.3Q6.32%2013%205%2013q-1.24%200-2.12-.88T2%2010t.88-2.12T5%207q1.3%200%202.21.99l4.38-2.3q-.09-.35-.09-.69%200-1.24.88-2.12T14.5%202t2.12.88T17.5%205t-.88%202.12T14.5%208q-1.3%200-2.21-.99l-4.38%202.3Q8%209.66%208%2010t-.09.69l4.38%202.3q.89-.99%202.21-.99z%27%20fill%3D%27%2382878c%27%2F%3E%3C%2Fsvg%3E"); 49 display: none; 50 } 51 52 .js .dashicons-share { 53 display: inline-block; 49 54 } 50 55 51 56 .wp-embed-share-dialog-open:hover .dashicons-share { … … body { 53 58 } 54 59 55 60 .wp-embed { 56 width: 100%;57 61 padding: 25px; 58 62 font: 400 14px/1.5 'Open Sans', sans-serif; 59 63 color: #82878c; … … body { 61 65 border: 1px solid #e5e5e5; 62 66 -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); 63 67 box-shadow: 0 1px 1px rgba(0, 0, 0, .05); 64 -webkit-box-sizing: border-box;65 -moz-box-sizing: border-box;66 box-sizing: border-box;67 68 /* Clearfix */ 68 69 overflow: auto; 69 70 zoom: 1; … … p.wp-embed-heading { 178 179 left: 0; 179 180 right: 0; 180 181 bottom: 0; 182 background-color: #222; 181 183 background-color: rgba(10, 10, 10, 0.9); 182 184 color: #fff; 183 185 opacity: 1; … … p.wp-embed-heading { 254 256 } 255 257 256 258 .wp-embed-share-tab-button { 257 display: inline ;259 display: inline-block; 258 260 } 259 261 260 262 .wp-embed-share-tab-button button { -
src/wp-includes/default-filters.php
diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 684bea4..8ee28ed 100644
a b add_filter( 'rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4 ); 447 447 add_action( 'wp_head', 'wp_oembed_add_discovery_links' ); 448 448 add_action( 'wp_head', 'wp_oembed_add_host_js' ); 449 449 450 add_action( 'embed_head', 'enqueue_embed_scripts', 1 ); 450 451 add_action( 'embed_head', 'print_emoji_detection_script' ); 451 add_action( 'embed_head', 'print_emoji_styles' );452 452 add_action( 'embed_head', 'print_embed_styles' ); 453 453 add_action( 'embed_head', 'wp_print_head_scripts', 20 ); 454 454 add_action( 'embed_head', 'wp_print_styles', 20 ); -
src/wp-includes/embed-functions.php
diff --git a/src/wp-includes/embed-functions.php b/src/wp-includes/embed-functions.php index 360399e..2f430b5 100644
a b function wp_oembed_add_host_js() { 372 372 wp_enqueue_script( 'wp-embed' ); 373 373 } 374 374 375 376 375 /** 377 376 * Retrieves the URL to embed a specific post in an iframe. 378 377 * … … function wp_embed_excerpt_attachment( $content ) { 864 863 } 865 864 866 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 */ 875 function 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' ); 885 } 886 887 /** 867 888 * Prints the CSS in the embed iframe header. 868 889 * 869 890 * @since 4.4.0 -
src/wp-includes/embed-template.php
diff --git a/src/wp-includes/embed-template.php b/src/wp-includes/embed-template.php index a7f948f..120ae3b 100644
a b if ( ! headers_sent() ) { 14 14 header( 'X-WP-embed: true' ); 15 15 } 16 16 17 wp_enqueue_style( 'open-sans' );18 19 17 ?> 20 18 <!DOCTYPE html> 21 <html <?php language_attributes(); ?> >19 <html <?php language_attributes(); ?> class="no-js"> 22 20 <head> 23 21 <title><?php echo wp_get_document_title(); ?></title> 24 22 <meta http-equiv="X-UA-Compatible" content="IE=edge"> -
src/wp-includes/js/wp-embed-template.js
diff --git a/src/wp-includes/js/wp-embed-template.js b/src/wp-includes/js/wp-embed-template.js index 847ebcf..b1dc73a 100644
a b 2 2 'use strict'; 3 3 4 4 var secret = window.location.hash.replace( /.*secret=([\d\w]{10}).*/, '$1' ), 5 supportedBrowser = ( document.querySelector && window.addEventListener ), 6 loaded = false, 5 7 resizing; 6 8 7 9 function sendEmbedMessage( message, value ) { … … 13 15 } 14 16 15 17 function onLoad() { 18 if ( loaded ) { 19 return; 20 } 21 loaded = true; 22 16 23 var share_dialog = document.querySelector( '.wp-embed-share-dialog' ), 17 24 share_dialog_open = document.querySelector( '.wp-embed-share-dialog-open' ), 18 25 share_dialog_close = document.querySelector( '.wp-embed-share-dialog-close' ), … … 141 148 } 142 149 } 143 150 144 document.addEventListener( 'DOMContentLoaded', onLoad, false );145 146 151 /** 147 152 * Iframe resize handler. 148 153 */ … … 158 163 }, 100 ); 159 164 } 160 165 161 window.addEventListener( 'resize', onResize, false ); 166 if ( supportedBrowser ) { 167 document.documentElement.className = document.documentElement.className.replace( /\bno-js\b/, '' ) + ' js'; 168 document.addEventListener( 'DOMContentLoaded', onLoad, false ); 169 window.addEventListener( 'load', onLoad, false ); 170 window.addEventListener( 'resize', onResize, false ); 171 } 162 172 })( window, document ); -
src/wp-includes/js/wp-embed.js
diff --git a/src/wp-includes/js/wp-embed.js b/src/wp-includes/js/wp-embed.js index 3829d0d..db1fe5b 100644
a b 1 1 (function ( window, document ) { 2 2 'use strict'; 3 3 4 var supportedBrowser = ( document.querySelector && window.addEventListener ), 5 loaded = false; 6 4 7 window.wp = window.wp || {}; 5 8 6 9 if ( !! window.wp.receiveEmbedMessage ) { … … 54 57 } 55 58 }; 56 59 57 window.addEventListener( 'message', window.wp.receiveEmbedMessage, false );58 59 60 function onLoad() { 61 if ( loaded ) { 62 return; 63 } 64 loaded = true; 65 60 66 var isIE10 = -1 !== navigator.appVersion.indexOf( 'MSIE 10' ), 61 67 isIE11 = !!navigator.userAgent.match( /Trident.*rv\:11\./ ), 62 68 iframes, iframeClone, i; … … 68 74 for ( i = 0; i < iframes.length; i++ ) { 69 75 iframeClone = iframes[ i ].cloneNode( true ); 70 76 iframeClone.removeAttribute( 'security' ); 71 iframes[ i ].parentNode.insertBefore( iframeClone, iframes[ i ].nextSibling ); 72 iframes[ i ].parentNode.removeChild( iframes[ i ] ); 77 iframes[ i ].parentNode.replaceChild( iframeClone, iframes[ i ] ); 73 78 } 74 79 } 75 80 } 76 81 77 document.addEventListener( 'DOMContentLoaded', onLoad, false ); 82 if ( supportedBrowser ) { 83 window.addEventListener( 'message', window.wp.receiveEmbedMessage, false ); 84 document.addEventListener( 'DOMContentLoaded', onLoad, false ); 85 window.addEventListener( 'load', onLoad, false ); 86 } 78 87 })( window, document ); -
src/wp-includes/script-loader.php
diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 72a7575..1c7efbb 100644
a b function wp_default_styles( &$styles ) { 727 727 $styles->add( 'open-sans', $open_sans_font_url ); 728 728 729 729 // Includes CSS 730 $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array( 'open-sans', 'dashicons' ) ); 731 $styles->add( 'wp-auth-check', "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) ); 732 $styles->add( 'editor-buttons', "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) ); 733 $styles->add( 'media-views', "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) ); 734 $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) ); 735 $styles->add( 'customize-preview', "/wp-includes/css/customize-preview$suffix.css" ); 730 $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array( 'open-sans', 'dashicons' ) ); 731 $styles->add( 'wp-auth-check', "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) ); 732 $styles->add( 'editor-buttons', "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) ); 733 $styles->add( 'media-views', "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) ); 734 $styles->add( 'wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) ); 735 $styles->add( 'customize-preview', "/wp-includes/css/customize-preview$suffix.css" ); 736 $styles->add( 'wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css" ); 737 $styles->add_data( 'wp-embed-template-ie', 'conditional', 'lte IE 8' ); 736 738 737 739 // External libraries and friends 738 740 $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' );