Make WordPress Core


Ignore:
Timestamp:
03/17/2009 02:58:15 AM (17 years ago)
Author:
ryan
Message:

Move submit check into WP_Widget

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-widgets.php

    r10800 r10801  
    4545   
    4646    function update( $new_instance, $old_instance ) {
    47         if ( !isset($new_instance['submit']) ) // user clicked cancel?
    48             return false;
    49 
    5047        $instance = $old_instance;
    5148        $instance['title'] = strip_tags($new_instance['title']);
     
    120117   
    121118    function update( $new_instance, $old_instance ) {
    122         if( !isset($new_instance['submit']) ) // user clicked cancel?
    123             return false;
    124 
    125119        $new_instance = (array) $new_instance;
    126120        $instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0);
     
    213207
    214208    function update( $new_instance, $old_instance ) {
    215         if ( !isset($new_instance['submit']) ) // user clicked cancel?
    216             return false;
    217 
    218209        $instance = $old_instance;
    219210        $new_instance = wp_parse_args( (array) $new_instance, array( 'title' => '', 'count' => 0, 'dropdown' => '') );
     
    276267
    277268    function update( $new_instance, $old_instance ) {
    278         if ( !isset($new_instance['submit']) ) // user clicked cancel?
    279             return false;
    280 
    281269        $instance = $old_instance;
    282270        $instance['title'] = strip_tags($new_instance['title']);
     
    319307
    320308    function update( $new_instance, $old_instance ) {
    321         if ( !isset($new_instance['submit']) ) // user clicked cancel?
    322             return false;
    323 
    324309        $instance = $old_instance;
    325310        $instance['title'] = strip_tags($new_instance['title']);
Note: See TracChangeset for help on using the changeset viewer.