register_column_headers

Register column headers for a particular screen.

Description

register_column_headers( (string) $screen, (array) $columns ); 

Parameters (2)

0. $screen (string)
The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
1. $columns (array)
An array of columns with column IDs as the keys and translated column names as the values

Usage

  1. if ( !function_exists( 'register_column_headers' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/list-table.php'; 
  3.  
  4. // The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. 
  5. $screen = ''; 
  6.  
  7. // An array of columns with column IDs as the keys and translated column names as the values 
  8. $columns = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = register_column_headers($screen, $columns); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/list-table.php  
  1. function register_column_headers($screen, $columns) { 
  2. new _WP_List_Table_Compat( $screen, $columns );