From 3039740a3a44a12d8f47dd8a411942b8f3ed6d22 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 23 Feb 2016 20:22:41 +0000 Subject: [PATCH] Embeds: Only display an iframe when it was successfully loaded. This prevents showing a blank iframe by first checking if a message was successfully received from it. Fixes #35894. git-svn-id: https://develop.svn.wordpress.org/trunk@36648 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/wp-embed.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/wp-includes/js/wp-embed.js b/src/wp-includes/js/wp-embed.js index 660558e03b..248ae2a36c 100644 --- a/src/wp-includes/js/wp-embed.js +++ b/src/wp-includes/js/wp-embed.js @@ -86,21 +86,16 @@ if ( loaded ) { return; } + loaded = true; var isIE10 = -1 !== navigator.appVersion.indexOf( 'MSIE 10' ), isIE11 = !!navigator.userAgent.match( /Trident.*rv:11\./ ), iframes = document.querySelectorAll( 'iframe.wp-embedded-content' ), - blockquotes = document.querySelectorAll( 'blockquote.wp-embedded-content' ), iframeClone, i, source, secret; - for ( i = 0; i < blockquotes.length; i++ ) { - blockquotes[ i ].style.display = 'none'; - } - for ( i = 0; i < iframes.length; i++ ) { source = iframes[ i ]; - source.style.display = ''; if ( source.getAttribute( 'data-secret' ) ) { continue;