February 12, 2011 1:15 am
Definition:
function img_caption_shortcode($attr, $content = null) {}
apply_filters('img_caption_shortcode', '', $attr, $content)function img_caption_shortcode($attr, $content = null) {
// Allow plugins/themes to override the default caption template.
$output = apply_filters('img_caption_shortcode', '', $attr, $content);
if ( $output != '' )
return $output;
extract(shortcode_atts(array(
'id' => '',
'align' => 'alignnone',
'width' => '',
'caption' => ''
), $attr));
if ( 1 > (int) $width || empty($caption) )
return $content;
if ( $id ) $id = 'id="' . esc_attr($id) . '" ';
return '<div ' . $id . 'class="wp-caption ' . esc_attr($align) . '" style="width: ' . (10 + (int) $width) . 'px">'
. do_shortcode( $content ) . '<p class="wp-caption-text">' . $caption . '</p></div>';
}
2005
Posted by Thorsten
Categories: /wp-includes/media.php, Documentation, Files, Filters, Filters by letter i, Functions, Functions by letter i
Tags: idced66e8a7b98307b1c5e35aaf9f53039, img_caption_shortcode
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.