WordPress开发者和主题制作者的搜索引擎



get_user_setting ›

Since2.7.0
已弃用n/a
get_user_setting ( $name, $default = false )
参数: (2)
  • (string) $name The name of the setting.
    Required: Yes
  • (string) $default Optional default value to return when $name is not set.
    Required: No
    默认: false
返回:
  • (mixed) the last saved user setting or the default value/false if it doesn't exist.
定义在:
文档:

Retrieve user interface setting value based on setting name.



源码

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