On this page
update_site_option( string $option, mixed $value ): bool
Updates the value of an option that was already added for the current network.
Description
See also
Parameters
$optionstring Required-
Name of the option. Expected to not be SQL-escaped.
$valuemixed Required-
Option value. Expected to not be SQL-escaped.
Return
bool True if the value was updated, false otherwise.
Source
File: wp-includes/option.php. View all references
function update_site_option( $option, $value ) {
return update_network_option( null, $option, $value );
}
Related
Uses
| Uses | Description |
|---|---|
| update_network_option() wp-includes/option.php | Updates the value of a network option that was already added. |
Used By
| Used By | Description |
|---|---|
| deactivated_plugins_notice() wp-admin/includes/plugin.php | Renders an admin notice when a plugin was deactivated during an update. |
| wp_ajax_toggle_auto_updates() wp-admin/includes/ajax-actions.php | Ajax handler to enable or disable plugin and theme auto-updates. |
| WP_Recovery_Mode_Cookie_Service::recovery_mode_hash() wp-includes/class-wp-recovery-mode-cookie-service.php | Gets a form of |
| update_network_option_new_admin_email() wp-includes/ms-functions.php | Sends a confirmation request email when a change of network admin email address is attempted. |
| WP_Theme::network_enable_theme() wp-includes/class-wp-theme.php | Enables a theme for all sites on the current network. |
| WP_Theme::network_disable_theme() wp-includes/class-wp-theme.php | Disables a theme for all sites on the current network. |
| WP_Automatic_Updater::after_core_update() wp-admin/includes/class-wp-automatic-updater.php | If we tried to perform a core update, check if we should send an email, and if we need to avoid processing future updates. |
| WP_Automatic_Updater::send_email() wp-admin/includes/class-wp-automatic-updater.php | Sends an email upon the completion or failure of a background core update. |
| WP_Plugins_List_Table::prepare_items() wp-admin/includes/class-wp-plugins-list-table.php | |
| grant_super_admin() wp-includes/capabilities.php | Grants Super Admin privileges. |
| revoke_super_admin() wp-includes/capabilities.php | Revokes Super Admin privileges. |
| dismiss_core_update() wp-admin/includes/update.php | Dismisses core update. |
| undismiss_core_update() wp-admin/includes/update.php | Undismisses core update. |
| upgrade_network() wp-admin/includes/upgrade.php | Executes network-level upgrade routines. |
| activate_plugin() wp-admin/includes/plugin.php | Attempts activation of plugin in a “sandbox” and redirects on success. |
| deactivate_plugins() wp-admin/includes/plugin.php | Deactivates a single plugin or multiple plugins. |
| wp_ajax_wp_compression_test() wp-admin/includes/ajax-actions.php | Ajax handler for compression testing. |
| wp_salt() wp-includes/pluggable.php | Returns a salt to add to hashes. |
| set_site_transient() wp-includes/option.php | Sets/updates the value of a site transient. |
| welcome_user_msg_filter() wp-includes/ms-functions.php | Ensures that the welcome message is not empty. Currently unused. |
Changelog
| Version | Description |
|---|---|
| 4.4.0 | Modified into wrapper for update_network_option() |
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/update_site_option