diff --git a/wp-includes/embed.php b/wp-includes/embed.php index 915314a767..33d7d8b832 100644 --- a/wp-includes/embed.php +++ b/wp-includes/embed.php @@ -966,7 +966,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( 'next_tag( array( 'tag_name' => 'iframe' ) ) ) { + if ( $p->has_class( 'wp-embedded-content' ) ) { + $p->remove_attribute( 'style' ); + } + } + return $p->get_updated_html(); } /** diff --git a/wp-includes/media.php b/wp-includes/media.php index c960e44c46..1c2a257c5b 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -2197,14 +2197,6 @@ function wp_img_tag_add_srcset_and_sizes_attr( $image, $context, $attachment_id * @return string Converted `iframe` tag with `loading` attribute added. */ function wp_iframe_tag_add_loading_attr( $iframe, $context ) { - /* - * Iframes with fallback content (see `wp_filter_oembed_result()`) should not be lazy-loaded because they are - * visually hidden initially. - */ - if ( str_contains( $iframe, ' data-secret="' ) ) { - return $iframe; - } - /* * Get loading attribute value to use. This must occur before the conditional check below so that even iframes that * are ineligible for being lazy-loaded are considered. diff --git a/wp-includes/version.php b/wp-includes/version.php index 7d95dce5fa..0982c86769 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58142'; +$wp_version = '6.6-alpha-58143'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.