register_column_headers

函数
register_column_headers ( $screen, $columns )
参数
  • (string) $screen The handle for the screen to register column headers for. This is usually the hook name returned by the `add_*_page()` functions.
    Required:
  • (string[]) $columns An array of columns with column IDs as the keys and translated column names as the values.
    Required:
相关
定义位置
相关方法
print_column_headersget_column_headersregister_default_headersunregister_default_headersrest_send_cors_headers
引入
2.7.0
弃用
-

register_column_headers: 这个函数用来为一个表注册列头。它需要两个参数:$screen和$columns。$screen是将要添加列的屏幕名称,$columns是一个列名和标签的数组。

为一个特定的屏幕注册列头。

function register_column_headers( $screen, $columns ) {
	new _WP_List_Table_Compat( $screen, $columns );
}

常见问题

FAQs
查看更多 >