Remove <br> elements for HTML5 galleries.

props obenland.
fixes #27637, see #26697.


git-svn-id: https://develop.svn.wordpress.org/trunk@27914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-04-02 21:49:38 +00:00
parent 63a83c88f8
commit 87bc851561
1 changed files with 3 additions and 2 deletions

View File

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