Permalink
Browse files

Set $attr['span'] to 1 if it's greater than the grid size.

  • Loading branch information...
1 parent 13ea202 commit ea4dbbab85b7d0e986be7059e5c6c87d8abf16e9 @justintadlock committed Sep 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 grid-columns.php
View
@@ -157,7 +157,7 @@ public function do_shortcode( $attr, $content = null ) {
$attr['grid'] = in_array( $attr['grid'], $this->allowed_grids ) ? absint( $attr['grid'] ) : 4;
/* Span cannot be greater than the grid. */
- $attr['span'] = ( $attr['grid'] >= $attr['span'] ) ? absint( $attr['span'] ) : $attr['grid'];
+ $attr['span'] = ( $attr['grid'] >= $attr['span'] ) ? absint( $attr['span'] ) : 1;
/* The push argument should always be less than the grid. */
$attr['push'] = ( $attr['grid'] > $attr['push'] ) ? absint( $attr['push'] ) : 0;

0 comments on commit ea4dbba

Please sign in to comment.