Remove hard coded max from random products widget.

This commit is contained in:
Patrick Garman 2013-04-03 10:25:36 -05:00
parent d5205b2b18
commit e6f3c99974
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 ) {
$instance = array(
'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'])
);