Media: remove unnecessary variable assignment in gallery_shortcode().

See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38309 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2016-08-22 20:52:44 +00:00
parent 0774c039f4
commit 0dcc38a1ef

View File

@ -1565,10 +1565,10 @@ function img_caption_shortcode( $attr, $content = null ) {
$caption_width = apply_filters( 'img_caption_shortcode_width', $width, $atts, $content );
$style = '';
if ( $caption_width )
if ( $caption_width ) {
$style = 'style="width: ' . (int) $caption_width . 'px" ';
}
$html = '';
if ( $html5 ) {
$html = '<figure ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
. do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>';