Un motore di ricerca WordPress per sviluppatori e autori di temi



get_user_setting ›

Da2.7.0
Deprecaton/a
get_user_setting ( $name, $default = false )
Parametri: (2)
  • (string) $name The name of the setting.
    Richiesto:
  • (string) $default Optional default value to return when $name is not set.
    Richiesto: No
    Default: false
Ritorna:
  • (mixed) the last saved user setting or the default value/false if it doesn't exist.
Definito a:
Codex:

Retrieve user interface setting value based on setting name.



Sorgenti

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