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
返回值
(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()
你可能对这些文章感兴趣:
- wordpress函数get_the_posts_navigation()用法示例
- wordpress函数get_the_title()用法示例
- wordpress函数get_the_terms()用法示例
- wordpress函数get_the_tags()用法示例
- wordpress函数get_the_taxonomies()用法示例
- wordpress函数get_the_permalink()用法示例
- wordpress函数get_the_password_form()用法示例
- wordpress函数get_the_posts_pagination()用法示例
- wordpress函数get_the_modified_time()用法示例
- wordpress函数get_the_modified_date()用法示例
- wordpress函数get_the_modified_author()用法示例
- wordpress函数get_the_guid()用法示例
- wordpress函数get_the_ID()用法示例
- wordpress函数get_the_excerpt()用法示例
如有疑问,请前往问答中心反馈!
反馈