caption

The Evolved 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).

/functions.php  
  1. /**-----------------------------------------------------------------------------------*/ 
  2. /* Fix wp-caption width 
  3. /**-----------------------------------------------------------------------------------*/ 
  4.  
  5. add_shortcode('wp_caption', 'fixed_img_caption_shortcode'); 
  6. add_shortcode('caption', 'fixed_img_caption_shortcode'); 
  7. function fixed_img_caption_shortcode($attr, $content = null) { 
  8. // Allow plugins/themes to override the default caption template. 
  9. $output = apply_filters('img_caption_shortcode', '', $attr, $content); 
  10. if ( $output != '' ) return $output; 
  11. extract(shortcode_atts(array(