^ 回到顶部
  • 人生没有定律,每个人都有自己的节奏
  • 本站wordpress建站教程均通过实践后发布,希望对你有帮助
  • 希望你的坚持,都是因为热爱,而不是因为不甘心
  • 8年wordpress建站经验,5星服务品质
  • 那些不愿意让你吃亏的人,才是真正值得你深交的人,也是值得你付出时间的人
  • 阿里云2核2g仅需86元/年

wordpress函数get_user_setting()用法示例

get_user_setting( string $name,  string $default = false )

Retrieve user interface setting value based on setting name.


描述


参数

$name

(string)
(Required)
The name of the setting.

新用户2核2g仅需86元/年    领取1153套模板    免费cdn流量包    ¥3188礼包

$default

(string)
(Optional)
default value to return when $name is not set.

Default value: false


返回值

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


源代码

File: wp-includes/option.php

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

更新日志

Version 描述
2.7.0 Introduced.

相关函数

Uses

  • wp-includes/option.php:
    get_all_user_settings()

Used By

  • wp-admin/includes/class-wp-ms-users-list-table.php:
    WP_MS_Users_List_Table::prepare_items()
  • wp-admin/includes/class-wp-screen.php:
    WP_Screen::show_screen_options()
  • wp-admin/includes/user.php:
    default_password_nag_handler()
  • wp-admin/includes/class-wp-ms-sites-list-table.php:
    WP_MS_Sites_List_Table::prepare_items()
  • wp-admin/includes/media.php:
    media_upload_type_form()
  • wp-admin/includes/media.php:
    media_upload_type_url_form()
  • wp-admin/includes/media.php:
    media_upload_gallery_form()
  • wp-admin/includes/media.php:
    media_upload_library_form()
  • wp-admin/includes/media.php:
    media_upload_max_image_resize()
  • wp-admin/includes/media.php:
    image_align_input_fields()
  • wp-admin/includes/media.php:
    image_size_input_fields()
  • wp-admin/includes/media.php:
    image_link_input_fields()
  • wp-admin/includes/class-wp-posts-list-table.php:
    WP_Posts_List_Table::prepare_items()
  • wp-includes/general-template.php:
    wp_default_editor()
  • wp-includes/class-wp-editor.php:
    _WP_Editors::parse_settings()
  • Show 10 more used by
    Hide more used by


让小雨知道,这篇文章帮到了你
扫码关注微信公众号zs40086(微搜片)随时随地微信看片,抢先福利电影等你来

热门推荐

如有疑问,请前往问答中心反馈!

反馈