register_column_headers

The timeline below displays how wordpress function register_column_headers has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.6

/**
 * Register column headers for a particular screen.
 *
 * @see get_column_headers(), print_column_headers(), get_hidden_columns()
 *
 * @since 2.7.0
 *
 * @param string    $screen The handle for the screen to register column headers for. This is
 *                          usually the hook name returned by the `add_*_page()` functions.
 * @param string[] $columns An array of columns with column IDs as the keys and translated
 *                          column names as the values.
 */
function register_column_headers($screen, $columns)
{
    new _WP_List_Table_Compat($screen, $columns);
}

WordPress Version: 5.5

/**
 * Register column headers for a particular screen.
 *
 * @see get_column_headers(), print_column_headers(), get_hidden_columns()
 *
 * @since 2.7.0
 *
 * @param string   $screen  The handle for the screen to add help to. This is usually the hook name returned by the
 *                          add_*_page() functions.
 * @param string[] $columns An array of columns with column IDs as the keys and translated column names as the values.
 */
function register_column_headers($screen, $columns)
{
    new _WP_List_Table_Compat($screen, $columns);
}

WordPress Version: 5.4

/**
 * Register column headers for a particular screen.
 *
 * @see get_column_headers(), print_column_headers(), get_hidden_columns()
 *
 * @since 2.7.0
 *
 * @param string  $screen   The handle for the screen to add help to. This is usually the hook name returned by the
 *                          add_*_page() functions.
 * @param string[] $columns An array of columns with column IDs as the keys and translated column names as the values.
 */
function register_column_headers($screen, $columns)
{
    new _WP_List_Table_Compat($screen, $columns);
}

WordPress Version: 4.7

/**
 * Register column headers for a particular screen.
 *
 * @since 2.7.0
 *
 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
 * @param array $columns An array of columns with column IDs as the keys and translated column names as the values
 * @see get_column_headers(), print_column_headers(), get_hidden_columns()
 */
function register_column_headers($screen, $columns)
{
    new _WP_List_Table_Compat($screen, $columns);
}

WordPress Version: 3.7

/**
 * Register column headers for a particular screen.
 *
 * @since 2.7.0
 *
 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions.
 * @param array $columns An array of columns with column IDs as the keys and translated column names as the values
 * @see get_column_headers(), print_column_headers(), get_hidden_columns()
 */
function register_column_headers($screen, $columns)
{
    $wp_list_table = new _WP_List_Table_Compat($screen, $columns);
}