get_user_setting() – Retrieve user interface setting value based on setting name.

You appear to be a bot. Output may be restricted

Description

Retrieves user interface setting value based on setting name.

Usage

$mixed = get_user_setting( $name, $default );

Parameters

$name
( string ) required – The name of the setting.
$default
( string|false ) optional – Optional. Default value to return when $name is not set. Default false.

Returns

mixed The last saved user setting or the default value/false if it doesn't exist.

Source

File name: wordpress/wp-includes/option.php
Lines:

1 to 5 of 5
function get_user_setting( $name, $default = false ) {
  $all_user_settings = get_all_user_settings();

  return isset( $all_user_settings[ $name ] ) ? $all_user_settings[ $name ] : $default;
}
 

 View on GitHub View on Trac