wpseek.com
A WordPress-centric search engine for devs and theme authors



get_user_setting › WordPress Function

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

Retrieves user interface setting value based on setting name.



Source

function get_user_setting( $name, $default_value = false ) {
	$all_user_settings = get_all_user_settings();

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