manage_{$screen->id}_columns
Filter HookDescription
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.Hook Information
File Location |
wp-admin/includes/screen.php
View on GitHub
|
Hook Type | Filter |
Line Number | 37 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$columns
|
The column header labels keyed by column ID. |
Usage Examples
Basic Usage
<?php
// Hook into manage_{$screen->id}_columns
add_filter('manage_{$screen->id}_columns', 'my_custom_filter', 10, 1);
function my_custom_filter($columns) {
// Your custom filtering logic here
return $columns;
}
Source Code Context
wp-admin/includes/screen.php:37
- How this hook is used in WordPress core
<?php
32 *
33 * @since 3.0.0
34 *
35 * @param string[] $columns The column header labels keyed by column ID.
36 */
37 $column_headers[ $screen->id ] = apply_filters( "manage_{$screen->id}_columns", array() );
38 }
39
40 return $column_headers[ $screen->id ];
41 }
42
PHP Documentation
<?php
/**
* 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.
*
* @since 3.0.0
*
* @param string[] $columns The column header labels keyed by column ID.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-admin/includes/screen.php
Related Hooks
Related hooks will be displayed here in future updates.