set_user_setting


set_user_setting ( $name, $value )

Parameters:
  • (string) name The name of the setting.
  • (string) value The value for the setting.
Returns:
  • (bool|null) True if set successfully, false otherwise. Null if the current user is not a member of the site.
Defined at:

Description

Adds or updates user interface setting.Both `$name` and `$value` can contain only ASCII letters, numbers, hyphens, and underscores. This function has to be used before any output has started as it calls `setcookie()`.

Related Functions

get_user_setting, delete_user_setting, get_all_user_settings, wp_user_settings, wp_set_all_user_settings

Top Google Results

User discussions

wpseek mobile