Ticket #25295: 25295.2.patch
File 25295.2.patch, 1.2 KB (added by , 11 years ago) |
---|
-
wp-includes/media.php
673 673 * 'aligncenter', alignright', 'alignnone'. 674 674 * @type int $width The width of the caption, in pixels. 675 675 * @type string $caption The caption text. 676 * @type string $class Additional class name(s) added to the caption container. 676 677 * } 677 678 * @param string $content Optional. Shortcode content. 678 679 * @return string HTML content to display the caption. … … 708 709 'id' => '', 709 710 'align' => 'alignnone', 710 711 'width' => '', 711 'caption' => '' 712 'caption' => '', 713 'class' => '' 712 714 ), $attr, 'caption' ); 713 715 714 716 $atts['width'] = (int) $atts['width']; … … 741 743 if ( $caption_width ) 742 744 $style = 'style="width: ' . (int) $caption_width . 'px" '; 743 745 744 return '<div ' . $atts['id'] . $style . 'class="wp-caption ' . esc_attr( $atts['align'] ) . ' ">'746 return '<div ' . $atts['id'] . $style . 'class="wp-caption ' . esc_attr( $atts['align'] ) . ' ' . esc_attr( $atts['class'] ) . '">' 745 747 . do_shortcode( $content ) . '<p class="wp-caption-text">' . $atts['caption'] . '</p></div>'; 746 748 } 747 749