From 0425e01d21fd3cfd5cd0b9a76b13a2dceba19a72 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 25 Feb 2016 10:23:27 +0000 Subject: [PATCH] Embeds: Use a more accessible way to initially hide the iframe. This fixes a bug in Firefox where assets inside the iframe aren't being displayed because they have no computed style. See #35894. Built from https://develop.svn.wordpress.org/trunk@36708 git-svn-id: http://core.svn.wordpress.org/trunk@36675 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/embed.php | 6 +++--- wp-includes/js/wp-embed.js | 2 +- wp-includes/js/wp-embed.min.js | 2 +- wp-includes/version.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 9ab1caadf0..3639a738e8 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -479,7 +479,7 @@ function get_post_embed_html( $width, $height, $post = null ) { * and edit wp-embed.js directly. */ $output .=<<1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); + !function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document); JS; } $output .= "\n//-->"; @@ -777,7 +777,7 @@ function wp_filter_oembed_result( $result, $data, $url ) { if ( ! empty( $content[1] ) ) { // We have a blockquote to fall back on. Hide the iframe by default. - $html = str_replace( '