AP_Search_Widget::update( array $new_instance, array $old_instance )

Description #

Sanitize widget form values as they are saved.

Parameters #

  • $new_instance
    array (Required) Values just sent to be saved.
  • $old_instance
    array (Required) Previously saved values from database.

Source #

File: widgets/search.php

	public function update( $new_instance, $old_instance ) {
		$instance = array();

		$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';

		return $instance;
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment