From 78c85d522258d38017d9f5869b238b8d6fe544c1 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 26 Mar 2008 03:34:55 +0000 Subject: [PATCH] Handle more than 3 columns in gallery. Props Dickie. fixes #6382 git-svn-id: https://develop.svn.wordpress.org/trunk@7516 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/media.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index dc47118796..7a51e4f3c0 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -368,6 +368,7 @@ function gallery_shortcode($attr) { $itemtag = tag_escape($itemtag); $captiontag = tag_escape($captiontag); $columns = intval($columns); + $itemwidth = $columns > 0 ? floor(100/$columns) : 100; $output = apply_filters('gallery_style', "