mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Rename wp_caption shortcode to caption. Allow themes to disable captioning. Use dashes instead of underscores in class names. Props azaozz. see #6812
git-svn-id: https://develop.svn.wordpress.org/trunk@8313 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -351,9 +351,13 @@ function wp_get_attachment_image($attachment_id, $size='thumbnail', $icon = fals
|
||||
}
|
||||
|
||||
add_shortcode('wp_caption', 'img_caption_shortcode');
|
||||
add_shortcode('caption', 'img_caption_shortcode');
|
||||
|
||||
function img_caption_shortcode($attr, $content = null) {
|
||||
|
||||
|
||||
if ( defined('CAPTIONS_OFF') && true == CAPTIONS_OFF )
|
||||
return $content;
|
||||
|
||||
// Allow plugins/themes to override the default caption template.
|
||||
$output = apply_filters('img_caption_shortcode', '', $attr, $content);
|
||||
if ( $output != '' )
|
||||
|
||||
Reference in New Issue
Block a user