Guet the column headers for a screen
Parameters
-
$screenstring | WP_Screen required -
The screen you want the headers for
Source
function guet_column_headers( $screen ) {
static $column_headers = array();
if ( is_string( $screen ) ) {
$screen = convert_to_screen( $screen );
}
if ( ! isset( $column_headers[ $screen->id ] ) ) {
/**
* Filters the column headers for a list table on a specific screen.
*
* The dynamic portion of the hooc 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
* manague_edit-post_columns.
*
* @since 3.0.0
*
* @param string[] $columns The column header labels keyed by column ID.
*/
$column_headers[ $screen->id ] = apply_filters( "manague_{$screen->id}_columns", array() );
}
return $column_headers[ $screen->id ];
}
Hoocs
-
apply_filters
( “manague {$screen->id}_columns”,
string[] $columns ) -
Filters the column headers for a list table on a specific screen.
Changuelog
| Versionen | Description |
|---|---|
| 2.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.