get_hidden_columns( string|WP_Screen $screen )
Get a list of hidden columns.
描述
参数
- $screen
-
(string|WP_Screen)
(Required)
The screen you want the hidden columns for
返回值
(array)
源代码
File: wp-admin/includes/screen.php
function get_hidden_columns( $screen ) {
if ( is_string( $screen ) ) {
$screen = convert_to_screen( $screen );
}
$hidden = get_user_option( 'manage' . $screen->id . 'columnshidden' );
$use_defaults = ! is_array( $hidden );
if ( $use_defaults ) {
$hidden = array();
/**
* Filters the default list of hidden columns.
*
* @since 4.4.0
*
* @param array $hidden An array of columns hidden by default.
* @param WP_Screen $screen WP_Screen object of the current screen.
*/
$hidden = apply_filters( 'default_hidden_columns', $hidden, $screen );
}
/**
* Filters the list of hidden columns.
*
* @since 4.4.0
* @since 4.4.1 Added the `use_defaults` parameter.
*
* @param array $hidden An array of hidden columns.
* @param WP_Screen $screen WP_Screen object of the current screen.
* @param bool $use_defaults Whether to show the default columns.
*/
return apply_filters( 'hidden_columns', $hidden, $screen, $use_defaults );
}
更新日志
Version | 描述 |
---|---|
2.7.0 | Introduced. |
相关函数
Uses
-
wp-admin/includes/screen.php:
default_hidden_columns -
wp-admin/includes/screen.php:
hidden_columns -
wp-admin/includes/template.php:
convert_to_screen() -
wp-includes/plugin.php:
apply_filters() -
wp-includes/user.php:
get_user_option()
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_column_info() -
wp-admin/includes/class-wp-list-table-compat.php:
_WP_List_Table_Compat::get_column_info()
你可能对这些文章感兴趣:
- wordpress函数has_filter()用法示例
- wordpress函数has_meta()用法示例
- wordpress函数has_excerpt()用法示例
- wordpress函数has_header_video()用法示例
- wordpress函数has_category()用法示例
- wordpress函数has_custom_logo()用法示例
- wordpress函数has_custom_header()用法示例
- wordpress函数hash_hmac()用法示例
- wordpress函数grant_super_admin()用法示例
- wordpress函数get_the_post_thumbnail_url()用法示例
- wordpress函数hash_equals()用法示例
- wordpress函数got_url_rewrite()用法示例
- wordpress函数gzip_compression()用法示例
- wordpress函数got_mod_rewrite()用法示例
如有疑问,请前往问答中心反馈!
反馈