';
echo $after_widget;
} //End of widget function
/**
* Sanitize widget form values as they are saved.
*
* @see WP_Widget::update()
*
* @param array $new_instance Values just sent to be saved.
* @param array $old_instance Previously saved values from database.
*
* @return array $instance Updated safe values to be saved.
*/
function update( $new_instance, $old_instance ) {
$instance = $old_instance;
// Validate and sanitize text fields
foreach ( $this->fields as $field ) {
$instance[$field] = strip_tags( $new_instance[$field] );
} // End of $fields foreach
// Validate and sanitize checkboxes
foreach ( $this->checkboxes as $checkbox ) {
$instance[$checkbox] = isset( $new_instance[$checkbox] );
} // End of $checkboxes foreach
// Validate and sanitize select
$instance['layout'] = strip_tags( $new_instance['layout'] );
return $instance;
} //End of update function
} // End of class artistdatapress_widget
?>