WP_Widget_RSS::update()publicWP 2.8.0

Handles updating settings for the current RSS widget instance.

Метод класса: WP_Widget_RSS{}

Хуков нет.

Возвращает

Массив. Updated settings to save.

Использование

$WP_Widget_RSS = new WP_Widget_RSS();
$WP_Widget_RSS->update( $new_instance, $old_instance );
$new_instance(массив) (обязательный)
New settings for this instance as input by the user via WP_Widget::form().
$old_instance(массив) (обязательный)
Old settings for this instance.

Список изменений

С версии 2.8.0 Введена.

Код WP_Widget_RSS::update() WP 6.5.2

public function update( $new_instance, $old_instance ) {
	$testurl = ( isset( $new_instance['url'] ) && ( ! isset( $old_instance['url'] ) || ( $new_instance['url'] !== $old_instance['url'] ) ) );
	return wp_widget_rss_process( $new_instance, $testurl );
}