function update($new_instance, $old_instance) { $instance = parent::update($new_instance, $old_instance); /* Process remaining options. */ /* Strip tags (if needed) and update the widget settings. */ $instance['venue'] = $new_instance['venue']; $instance['country'] = $new_instance['country']; $instance['address'] = $new_instance['address']; $instance['city'] = $new_instance['city']; $instance['region'] = $new_instance['region']; $instance['zip'] = $new_instance['zip']; $instance['phone'] = $new_instance['phone']; $instance['cost'] = $new_instance['cost']; $instance['category'] = $new_instance['category']; $instance['organizer'] = $new_instance['organizer']; return $instance; }
public function update($new_instance, $old_instance) { $instance = parent::update($new_instance, $old_instance); $instance['venue'] = $new_instance['venue']; $instance['country'] = $new_instance['country']; $instance['address'] = $new_instance['address']; $instance['city'] = $new_instance['city']; $instance['region'] = $new_instance['region']; $instance['zip'] = $new_instance['zip']; $instance['phone'] = $new_instance['phone']; $instance['cost'] = $new_instance['cost']; $instance['organizer'] = $new_instance['organizer']; $instance['operand'] = strip_tags($new_instance['operand']); $instance['filters'] = maybe_unserialize($new_instance['filters']); // @todo remove after 3.7 (added for continuity when users transition from 3.5.x or earlier to this release) if (isset($old_instance['category'])) { $this->include_cat_id($instance['filters'], $old_instance['category']); unset($instance['category']); } return $instance; }