public function update($new_instance, $old_instance)
    {
        $instance = array();
        $instance['title'] = (! empty($new_instance['title'])) ? strip_tags($new_instance['title']) : '';
        $instance['limit'] = absint($new_instance['limit']);
        $instance['days_ahead'] = absint($new_instance['days_ahead']);
        $instance['show_date'] = isset( $new_instance['show_date'] ) ? (bool) $new_instance['show_date'] : false;
        $instance['show_location'] = isset( $new_instance['show_location'] ) ? (bool) $new_instance['show_location'] : false;
        $instance['show_image'] = isset( $new_instance['show_image'] ) ? (bool) $new_instance['show_image'] : false;
        $instance['show_content'] = isset( $new_instance['show_content'] ) ? (bool) $new_instance['show_content'] : false;
        $instance['content_limit'] = $new_instance['content_limit'];
        return $instance;
    }
public function update($new_instance, $old_instance)
    {
        $instance = array();
        $instance['title'] = (! empty($new_instance['title'])) ? strip_tags($new_instance['title']) : '';
        $instance['limit'] = absint($new_instance['limit']);
        $instance['days_ahead'] = absint($new_instance['days_ahead']);
        $instance['show_date'] = isset( $new_instance['show_date'] ) ? (bool) $new_instance['show_date'] : false;
        $instance['show_location'] = isset( $new_instance['show_location'] ) ? (bool) $new_instance['show_location'] : false;
        $instance['show_image'] = isset( $new_instance['show_image'] ) ? (bool) $new_instance['show_image'] : false;
        $instance['show_content'] = isset( $new_instance['show_content'] ) ? (bool) $new_instance['show_content'] : false;
        $instance['content_limit'] = $new_instance['content_limit'];
        return $instance;
    }
public function update ( $ new_instance , $ old_instance ) { $ instance = array ( ) ; $ instance [ 'title' ] = ( ! empty ( $ new_instance [ 'title' ] ) ) ? strip_tags ( $ new_instance [ 'title' ] ) : '' ; $ instance [ 'limit' ] = absint ( $ new_instance [ 'limit' ] ) ; $ instance [ 'days_ahead' ] = absint ( $ new_instance [ 'days_ahead' ] ) ; $ instance [ 'show_date' ] = isset ( $ new_instance [ 'show_date' ] ) ? ( bool ) $ new_instance [ 'show_date' ] : false ; $ instance [ 'show_location' ] = isset ( $ new_instance [ 'show_location' ] ) ? ( bool ) $ new_instance [ 'show_location' ] : false ; $ instance [ 'show_image' ] = isset ( $ new_instance [ 'show_image' ] ) ? ( bool ) $ new_instance [ 'show_image' ] : false ; $ instance [ 'show_content' ] = isset ( $ new_instance [ 'show_content' ] ) ? ( bool ) $ new_instance [ 'show_content' ] : false ; $ instance [ 'content_limit' ] = $ new_instance [ 'content_limit' ] ; return $ instance ; }
Handles updating the settings for the current Display Events widget instance.

@param array $new_instance Values just sent to be saved.
@param array $old_instance Previously saved values from database.

@return array Updated safe values to be saved.
Handles updating the settings for the current Display Events widget instance .