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

wordpress函数get_column_headers()用法示例

get_column_headers( string|WP_Screen $screen )

Get the column headers for a screen


描述


参数

$screen

(string|WP_Screen)
(Required)
The screen you want the headers for

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


返回值

(array) Containing the headers in the format id => UI String


源代码

File: wp-admin/includes/screen.php

function get_column_headers( $screen ) {
	if ( is_string( $screen ) )
		$screen = convert_to_screen( $screen );

	static $column_headers = array();

	if ( ! isset( $column_headers[ $screen->id ] ) ) {

		/**
		 * Filters the column headers for a list table on a specific screen.
		 *
		 * The dynamic portion of the hook name, `$screen->id`, refers to the
		 * ID of a specific screen. For example, the screen ID for the Posts
		 * list table is edit-post, so the filter for that screen would be
		 * manage_edit-post_columns.
		 *
		 * @since 3.0.0
		 *
		 * @param array $columns An array of column headers. Default empty.
		 */
		$column_headers[ $screen->id ] = apply_filters( "manage_{$screen->id}_columns", array() );
	}

	return $column_headers[ $screen->id ];
}

更新日志

Version 描述
2.7.0 Introduced.

相关函数

Uses

  • wp-admin/includes/screen.php:
    manage_{$screen->id}_columns
  • wp-admin/includes/template.php:
    convert_to_screen()
  • wp-includes/plugin.php:
    apply_filters()

Used By

  • wp-admin/includes/class-wp-screen.php:
    WP_Screen::render_list_table_columns_preferences()
  • wp-admin/includes/class-wp-list-table.php:
    WP_List_Table::get_primary_column_name()
  • wp-admin/includes/class-wp-screen.php:
    WP_Screen::show_screen_options()
  • wp-admin/includes/class-wp-list-table.php:
    WP_List_Table::get_column_info()
  • wp-admin/includes/class-wp-list-table-compat.php:
    _WP_List_Table_Compat::get_column_info()

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

热门推荐

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

反馈