remove_shortcode

函式
remove_shortcode ( $tag )
引數
  • (string) $tag Shortcode tag to remove hook for.
    Required:
定義位置
相關方法
remove_all_shortcodesdo_shortcoderemove_rolewp_video_shortcodeadd_shortcode
引入
2.5.0
棄用
-

remove_shortcode: 這個函式用來從WordPress中刪除一個短碼。短碼是用來向文章和頁面新增動態內容的: 這個函式需要一個引數,就是要刪除的短碼的名稱。

刪除短程式碼的鉤子。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function remove_shortcode( $tag ) {
global $shortcode_tags;
unset( $shortcode_tags[ $tag ] );
}
function remove_shortcode( $tag ) { global $shortcode_tags; unset( $shortcode_tags[ $tag ] ); }
function remove_shortcode( $tag ) {
	global $shortcode_tags;

	unset( $shortcode_tags[ $tag ] );
}

常見問題

FAQs
檢視更多 >