strip_shortcodes_tagnames

過濾鉤子
apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content )
引數
  • (array) $tags_to_remove Array of shortcode tags to remove.
    Required:
  • (string) $content Content shortcodes are being removed from.
    Required:
定義位置
相關勾子
do_shortcode_tagpre_do_shortcode_tagscript_loader_tagwp_sitemaps_taxonomieswp_audio_shortcode_library
相關方法
strip_shortcode_tagstrip_shortcodesdo_shortcode_tagdo_shortcodes_in_html_tagsshortcode_attsshortcode_exists
引入
4.7.0
棄用
-

strip_shortcodes_tagnames: 這是一個WordPress的過濾鉤子,允許開發者從註冊的短程式碼列表中刪除短程式碼。這對那些不再使用或需要暫時禁用的短程式碼很有用。

過濾要從內容中刪除的短碼標籤列表。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content );
$tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content );
$tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content );

常見問題

FAQs
檢視更多 >