Changeset 58143 for trunk/src/wp-includes/embed.php
- Timestamp:
- 05/13/2024 10:37:38 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/embed.php
r58097 r58143 967 967 if ( ! empty( $content[1] ) ) { 968 968 // We have a blockquote to fall back on. Hide the iframe by default. 969 $html = str_replace( '<iframe', '<iframe style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"', $html );969 $html = str_replace( '<iframe', '<iframe style="position: absolute; visibility: hidden;"', $html ); 970 970 $html = str_replace( '<blockquote', '<blockquote class="wp-embedded-content"', $html ); 971 971 } … … 1100 1100 */ 1101 1101 function _oembed_filter_feed_content( $content ) { 1102 return str_replace( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"', '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"', $content ); 1102 $p = new WP_HTML_Tag_Processor( $content ); 1103 while ( $p->next_tag( array( 'tag_name' => 'iframe' ) ) ) { 1104 if ( $p->has_class( 'wp-embedded-content' ) ) { 1105 $p->remove_attribute( 'style' ); 1106 } 1107 } 1108 return $p->get_updated_html(); 1103 1109 } 1104 1110
Note: See TracChangeset
for help on using the changeset viewer.