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,是短码的名称。

$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2026-01-29 14:09:47

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: