WP_Widget_Search::update

Advertisement

Summery Summery

Handles updating settings for the current Search widget instance.

Syntax Syntax

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

Parameters Parameters

$new_instance

(array) (Required) New settings for this instance as input by the user via WP_Widget::form().

$old_instance

(array) (Required) Old settings for this instance.

Return Return

(array) Updated settings.

Source Source

File: wp-includes/widgets/class-wp-widget-search.php

	 * @param array $old_instance Old settings for this instance.
	 * @return array Updated settings.
	 */
	public function update( $new_instance, $old_instance ) {
		$instance          = $old_instance;
		$new_instance      = wp_parse_args( (array) $new_instance, array( 'title' => '' ) );

Advertisement

Changelog Changelog

Changelog
Version Description
2.8.0 Introduced.

Advertisement

Leave a Reply

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