WordPress at a glance
function is not described

WP_Widget_Archives::update() public WP 2.8.0

Handles updating settings for the current Archives widget instance.

{} It's a method of the class: WP_Widget_Archives{}

No Hooks.

Return

Array. Updated settings to save.

Usage

$WP_Widget_Archives = new WP_Widget_Archives();
$WP_Widget_Archives->update( $new_instance, $old_instance );
$new_instance(array) (required)
New settings for this instance as input by the user via WP_Widget_Archives::form().
$old_instance(array) (required)
Old settings for this instance.

Changelog

Since 2.8.0 Introduced.

Code of WP_Widget_Archives::update() WP 5.7.2

<?php
public function update( $new_instance, $old_instance ) {
	$instance             = $old_instance;
	$new_instance         = wp_parse_args(
		(array) $new_instance,
		array(
			'title'    => '',
			'count'    => 0,
			'dropdown' => '',
		)
	);
	$instance['title']    = sanitize_text_field( $new_instance['title'] );
	$instance['count']    = $new_instance['count'] ? 1 : 0;
	$instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0;

	return $instance;
}