Merge pull request #2864 from pmgarman/master

Remove hard coded max from random products widget.
This commit is contained in:
Mike Jolley 2013-04-03 12:09:53 -07:00
commit 2f4f9c2b42
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class WC_Widget_Random_Products extends WP_Widget {
function update( $new_instance, $old_instance ) { function update( $new_instance, $old_instance ) {
$instance = array( $instance = array(
'title' => strip_tags($new_instance['title']), 'title' => strip_tags($new_instance['title']),
'number' => min(15, max(1, (int) $new_instance['number'])), 'number' => absint( $new_instance['number'] ),
'show_variations' => ! empty($new_instance['show_variations']) 'show_variations' => ! empty($new_instance['show_variations'])
); );