WordPress开发者和主题制作者的搜索引擎



post_gallery ›

Since4.2.0
已弃用n/a
apply_filters( 'post_gallery', '', $attr, $instance )
参数: (3)
  • (string) $output The gallery output. Default empty.
    Required: Yes
  • (array) $attr Attributes of the gallery shortcode.
    Required: Yes
  • (int) $instance Unique numeric ID of this gallery shortcode instance.
    Required: Yes
查看:
  • gallery_shortcode()
定义在:
文档:

Filters the default gallery shortcode output.

If the filtered output isn't empty, it will be used instead of generating the default gallery template.





源码

$output = apply_filters( 'post_gallery', '', $attr, $instance );