Function: delete_user_setting

delete_user_setting( string $names )

Delete user interface settings.

Deleting settings would reset them to the defaults.

This function has to be used before any output has started as it calls setcookie().


Name Type(s) Default Value Description
$names string

The name or array of names of the setting to be deleted.


boolean | null

True if deleted successfully, false if not. Null if the current user can't be established.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.