Remove <br> elements for HTML5 galleries.

props obenland.
fixes #27637, see #26697.

Built from https://develop.svn.wordpress.org/trunk@27914


git-svn-id: http://core.svn.wordpress.org/trunk@27745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-04-02 21:50:14 +00:00
parent 158597a5e3
commit 079ddec045
1 changed files with 3 additions and 2 deletions

View File

@ -992,11 +992,12 @@ function gallery_shortcode( $attr ) {
</{$captiontag}>"; </{$captiontag}>";
} }
$output .= "</{$itemtag}>"; $output .= "</{$itemtag}>";
if ( $columns > 0 && ++$i % $columns == 0 ) if ( ! $html5 && $columns > 0 && ++$i % $columns == 0 ) {
$output .= '<br style="clear: both" />'; $output .= '<br style="clear: both" />';
}
} }
if ( $columns > 0 && $i % $columns !== 0 ) { if ( ! $html5 && $columns > 0 && $i % $columns !== 0 ) {
$output .= " $output .= "
<br style='clear: both' />"; <br style='clear: both' />";
} }