embed_cache_oembed_types

過濾鉤子
apply_filters( 'embed_cache_oembed_types', $post_types )
引數
  • (string[]) $post_types Array of post type names to cache oEmbed results for. Defaults to post types with `show_ui` set to true.
    Required:
定義位置
相關勾子
embed_oembed_htmlembed_oembed_discoverfeed_content_typewp_read_image_metadata_typesget_comment_type
相關方法
wp_match_mime_typesfeed_content_typeget_comment_typewp_get_mime_typesget_available_post_mime_types_wp_batch_update_comment_type
引入
2.9.0
棄用
-

embed_cache_oembed_types: 這個過濾器鉤子允許你修改用於快取oEmbed響應的oEmbed提供者URL方案的列表。

過濾要快取oEmbed結果的文章型別陣列。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$cache_oembed_types = apply_filters( 'embed_cache_oembed_types', $post_types );
$cache_oembed_types = apply_filters( 'embed_cache_oembed_types', $post_types );
$cache_oembed_types = apply_filters( 'embed_cache_oembed_types', $post_types );

常見問題

FAQs
檢視更多 >