caption

The WordPress Core caption shortcode.


Usage

  1. // basic usage 
  2. echo do_shortcode('[caption]'); 
  1. // variable usage 
  2. $result = do_shortcode('[caption]'); 
  3. echo $result;  

Defined (1)

The shortcode is defined in the following location(s).

/wp-includes/media.php  
  1. function _wp_post_thumbnail_class_filter_remove( $attr ) { 
  2.  
  3. add_shortcode('wp_caption', 'img_caption_shortcode'); 
  4. add_shortcode('caption', 'img_caption_shortcode'); 
  5.  
  6. /** 
  7. * Builds the Caption shortcode output. 
  8. * Allows a plugin to replace the content that would otherwise be returned. The