Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



image_add_caption_text ›

Seit4.1.0
Veraltetn/v
apply_filters( 'image_add_caption_text', $caption, $id )
Parameter: (2)
  • (string) $caption The original caption text.
    Erforderlich: Ja
  • (int) $id The attachment ID.
    Erforderlich: Ja
Definiert in:
Codex:

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().





Quellcode

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