pre_do_shortcode_tag

過濾鉤子
apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m )
引數
  • (false|string) $return Short-circuit return value. Either false or the value to replace the shortcode with.
    Required:
  • (string) $tag Shortcode name.
    Required:
  • (array|string) $attr Shortcode attributes array or empty string.
    Required:
  • (array) $m Regular expression match array.
    Required:
定義位置
相關勾子
do_shortcode_tagwp_audio_shortcode_librarywp_video_shortcode_librarystrip_shortcodes_tagnamespre_get_shortlink
相關方法
do_shortcode_tagstrip_shortcode_tagdo_shortcodewp_video_shortcodewp_audio_shortcoderemove_shortcode
引入
4.7.0
棄用
-

pre_do_shortcode_tag: 這是WordPress的一個過濾鉤子,允許你在do_shortcode函式處理之前修改一個短碼的輸出。該鉤子在指定的短碼標籤被處理之前被觸發,允許你修改或替換短碼的輸出。

篩選是否呼叫短程式碼回撥。

從過濾器返回一個非假值將使短程式碼生成過程短路,而是返回該值。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
$return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
$return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );

常見問題

FAQs
檢視更多 >