From e0e8203af0161ba7ea7dab8f7b68db2cc74a539d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 28 Mar 2014 02:41:15 +0000 Subject: [PATCH] Galleries: Avoid doubling up clearing br elements. props drozdz. fixes #25537. Built from https://develop.svn.wordpress.org/trunk@27800 git-svn-id: http://core.svn.wordpress.org/trunk@27635 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 5796caf28c..69079a8023 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -996,8 +996,12 @@ function gallery_shortcode( $attr ) { $output .= '
'; } + if ( $columns > 0 && $i % $columns !== 0 ) { + $output .= " +
"; + } + $output .= " -
\n"; return $output;