wpseek.com
WordPress开发者和主题制作者的搜索引擎



_oembed_filter_feed_content › WordPress Function

Since4.4.0
已弃用n/a
› _oembed_filter_feed_content ( $content )
访问:
  • private
参数:
  • (string) $content The content to filter.
    Required: Yes
返回:
  • (string) The filtered content.
定义在:
文档:

Prepare the oembed HTML to be displayed in an RSS feed.



源码

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();
}