Core Function
View Source on Trac ↗ update_user_option()
update_user_option( mixed $user_id, mixed $option_name, mixed $newvalue, mixed $is_global = false ) Updates user option with global blog capability.
Parameters 4 required
| Name / Type | Description |
|---|---|
| $user_id int | User ID. Required |
| $option_name string | User option name. Required |
| $newvalue mixed | User option value. Required |
| bool | $is_global Optional. Whether option name is global or blog specific. Default false (blog specific). Required |
Return Value
((int)
(int | bool) User meta ID if the option didn't exist, true on successful update,
false on failure.
Function Information
Since Version
2.0.0
Source File
wp-includes/user.php
Advertisement