Make WordPress Core

Ticket #14543: 14543.patch

File 14543.patch, 588 bytes (added by JohnPBloch, 14 years ago)
  • wp-includes/default-widgets.php

     
    567567                $instance = $old_instance;
    568568                $instance['title'] = strip_tags($new_instance['title']);
    569569                $instance['number'] = (int) $new_instance['number'];
     570                $instance['number'] = ( $instance['number'] < 1 ) ? 5 : ( ( $instance['number'] > 15 ) ? 5 : $instance['number'] );
    570571                $this->flush_widget_cache();
    571572
    572573                $alloptions = wp_cache_get( 'alloptions', 'options' );