Filters the column headers for a list table on a specific screen.
The dynamic portion of the hook 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 manage_edit-post_columns.
$columnsstring[]
We need to care while using manage_{$screen->id}_columns hook for media screen because when we used manage_media_columns hook we will receive Too few arguments fatal error in Add New Media File page error.
<?php
add_filter( 'manage_media_columns', array( $this, 'filter_media_table_columns' ), 100, 2 ); This error is coming because in the ‘manage_media_columns’ filter hook in wp-admin/includes/class-wp-media-list-table.php passes two arguments.
Hook Details : https://developer.wordpress.org/reference/hooks/manage_media_columns/
$column_headers[ $screen->id ] = apply_filters( "manage_{$screen->id}_columns", array() );
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/manage_screen-id_columns