Uses
Uses | Description |
---|---|
wp-includes/option.php: update_option() | Updates the value of an option that was already added. |
This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Set the sidebar widget option to update sidebars.
(array) (Required) Sidebar widgets and their settings.
File: wp-includes/widgets.php
function wp_set_sidebars_widgets( $sidebars_widgets ) { global $_wp_sidebars_widgets; // Clear cached value used in wp_get_sidebars_widgets(). $_wp_sidebars_widgets = null; if ( ! isset( $sidebars_widgets['array_version'] ) ) { $sidebars_widgets['array_version'] = 3; } update_option( 'sidebars_widgets', $sidebars_widgets ); }
Version | Description |
---|---|
2.2.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_set_sidebars_widgets