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



image_add_caption_text › WordPress过滤钩子

Since4.1.0
已弃用n/a
› apply_filters( 'image_add_caption_text', $caption, $id )
参数: (2)
  • () caption The original caption text.
    Required: Yes
  • () id The attachment ID.
    Required: Yes
定义在:
文档:

Filters the caption text.

Note: If the caption text is empty, the caption shortcode will not be appended to the image HTML when inserted into the editor. Passing an empty value also prevents the {@see 'image_add_caption_shortcode'} Filters from being evaluated at the end of image_add_caption().




源码

$caption = apply_filters( 'image_add_caption_text', $caption, $id );