_oembed_filter_feed_content()
Prepare the oembed HTML to be displayed in an RSS feed.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Returns
String. The filtered content.
Usage
_oembed_filter_feed_content( $content );
- $content(string) (required)
- The content to filter.
Changelog
| Since 4.4.0 | Introduced. |
_oembed_filter_feed_content() oembed filter feed content code WP 7.0
function _oembed_filter_feed_content( $content ) {
$p = new WP_HTML_Tag_Processor( $content );
while ( $p->next_tag( array( 'tag_name' => 'iframe' ) ) ) {
if ( $p->has_class( 'wp-embedded-content' ) ) {
$p->remove_attribute( 'style' );
}
}
return $p->get_updated_html();
}