diff --git a/src/wp-includes/js/wp-embed.js b/src/wp-includes/js/wp-embed.js index 966a41f74a..3be0dc7245 100644 --- a/src/wp-includes/js/wp-embed.js +++ b/src/wp-includes/js/wp-embed.js @@ -97,15 +97,13 @@ for ( i = 0; i < iframes.length; i++ ) { source = iframes[ i ]; - if ( source.getAttribute( 'data-secret' ) ) { - continue; + if ( ! source.getAttribute( 'data-secret' ) ) { + /* Add secret to iframe */ + secret = Math.random().toString( 36 ).substr( 2, 10 ); + source.src += '#?secret=' + secret; + source.setAttribute( 'data-secret', secret ); } - /* Add secret to iframe */ - secret = Math.random().toString( 36 ).substr( 2, 10 ); - source.src += '#?secret=' + secret; - source.setAttribute( 'data-secret', secret ); - /* Remove security attribute from iframes in IE10 and IE11. */ if ( ( isIE10 || isIE11 ) ) { iframeClone = source.cloneNode( true );