set_user_setting

SummerySummery

Adds or updates user interface setting.

Syntax

set_user_setting( string $name, string $value )

DescriptionDescription

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().

ParametersParameters

$name

(string) (Required) The name of the setting.

$value

(string) (Required) The value for the setting.

ReturnReturn

(bool|null) True if set successfully, false if not. Null if the current user can't be established.

SourceSource

File: wp-includes/option.php


			

ChangelogChangelog

Changelog
Version Description
2.8.0 Introduced.
Scroll to Top