WP_Widget::save_settings() WordPress Method

The WP_Widget::save_settings() method is used to save settings for a particular widget instance. This is typically done when the user modified the widget settings from the front-end.

WP_Widget::save_settings( array $settings ) #

Saves the settings for all instances of the widget class.


Parameters

$settings

(array)(Required)Multi-dimensional array of widget instance settings.


Top ↑

Source

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

	public function save_settings( $settings ) {
		$settings['_multiwidget'] = 1;
		update_option( $this->option_name, $settings );
	}


Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.