A WordPress-centric search engine for devs and theme authors



get_user_setting ›

Since2.7.0
Deprecatedn/a
get_user_setting ( $name, $default = false )
Parameters: (2)
  • (string) $name The name of the setting.
    Required: Yes
  • (string) $default Optional default value to return when $name is not set.
    Required: No
    Default: false
Returns:
  • (mixed) the last saved user setting or the default value/false if it doesn't exist.
Defined at:
Codex:

Retrieve user interface setting value based on setting name.



Source

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;
}