shortcode_atts_{$shortcode}

過濾鉤子
apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode )
引數
  • (array) $out The output array of shortcode attributes.
    Required:
  • (array) $pairs The supported attributes and their defaults.
    Required:
  • (array) $atts The user defined shortcode attributes.
    Required:
  • (string) $shortcode The shortcode name.
    Required:
定義位置
相關勾子
pre_do_shortcode_tagdo_shortcode_tagshow_password_fields
相關方法
shortcode_attsget_shortcode_atts_regexhas_shortcoderemove_all_shortcodesshortcode_parse_attsshortcode_unautop
引入
4.4.0
棄用
-

shortcode_atts_{$shortcode}是一個過濾鉤子,允許你修改WordPress中一個短碼的預設屬性。$shortcode變數是你要修改的短碼的名稱。通過使用這個鉤子,您可以新增、刪除或改變一個特定的短碼的預設屬性。

過濾短碼屬性。

如果shortcode_atts()函式的第三個引數存在,那麼這個過濾器就可用。第三個引數,$shortcode,是短碼的名稱。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );

常見問題

FAQs
檢視更多 >