You appear to be a bot. Output may be restricted
Description
Deal with the settings when they are saved by the admin.
Here is where any validation should happen.
Usage
$array = Twenty_Fourteen_Ephemera_Widget::update( $new_instance, $old_instance );
Parameters
- $new_instance
- ( array ) required – New widget instance.
- $old_instance
- ( array ) required – Original widget instance.
Returns
array Updated widget instance.
Source
File name: twentyfourteen/inc/widgets.php
Lines:
1 to 11 of 11
public function update( $new_instance, $old_instance ) { $old_instance['title'] = strip_tags( $new_instance['title'] ); $old_instance['number'] = empty( $new_instance['number'] ) ? 2 : absint( $new_instance['number'] ); if ( in_array( $new_instance['format'], $this->formats, true ) ) { $old_instance['format'] = $new_instance['format']; } return $old_instance; }