_oembed_filter_feed_content

函式
_oembed_filter_feed_content ( $content )
Access
Private
引數
  • (string) $content The content to filter.
    Required:
返回值
  • (string) The filtered content.
定義位置
相關方法
filter_block_contentwp_oembed_register_routerest_filter_response_by_contextget_theme_starter_contentwp_filter_content_tags
引入
4.4.0
棄用
-

_oembed_filter_feed_content: 這個函式用來過濾feed中oEmbed響應的內容。

準備好顯示在RSS提要中的嵌入HTML。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _oembed_filter_feed_content( $content ) {
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 );
}
function _oembed_filter_feed_content( $content ) { 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 ); }
function _oembed_filter_feed_content( $content ) {
	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 );
}

常見問題

FAQs
檢視更多 >