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

wordpress函数convert_to_screen()用法示例

convert_to_screen( string $hook_name )

Convert a screen string to a screen object


描述


参数

$hook_name

(string)
(Required)
The hook name (also known as the hook suffix) used to determine the screen.


返回值

(WP_Screen) Screen object.


源代码

File: wp-admin/includes/template.php

function convert_to_screen( $hook_name ) {
	if ( ! class_exists( 'WP_Screen' ) ) {
		_doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3.0' );
		return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
	}

	return WP_Screen::get( $hook_name );
}

更新日志

Version 描述
3.0.0 Introduced.

相关函数

Uses

  • wp-admin/includes/class-wp-screen.php:
    WP_Screen::get()
  • wp-includes/l10n.php:
    __()
  • wp-includes/functions.php:
    _doing_it_wrong()

Used By

  • wp-admin/includes/class-wp-list-table-compat.php:
    _WP_List_Table_Compat::__construct()
  • wp-admin/includes/screen.php:
    get_column_headers()
  • wp-admin/includes/screen.php:
    get_hidden_columns()
  • wp-admin/includes/screen.php:
    meta_box_prefs()
  • wp-admin/includes/screen.php:
    get_hidden_meta_boxes()
  • wp-admin/includes/deprecated.php:
    add_contextual_help()
  • wp-admin/includes/class-wp-list-table.php:
    WP_List_Table::__construct()
  • wp-admin/includes/list-table.php:
    _get_list_table()
  • wp-admin/includes/template.php:
    add_meta_box()
  • wp-admin/includes/template.php:
    do_meta_boxes()
  • wp-admin/includes/template.php:
    remove_meta_box()
  • wp-admin/includes/template.php:
    do_accordion_sections()
  • Show 7 more used by
    Hide more used by


User Contributed Notes

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

热门推荐

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

反馈