manage_(post_type)_posts_columns
Filters the columns displayed in the Posts list table for a specific post type.
The dynamic portion of the hook name, $post_type, refers to the post type slug.
Possible hook names include:
Usage
add_filter( 'manage_(post_type)_posts_columns', 'wp_kama_manage_post_type_posts_columns_filter' );
/**
* Function for `manage_(post_type)_posts_columns` filter-hook.
*
* @param string[] $posts_columns An associative array of column headings.
*
* @return string[]
*/
function wp_kama_manage_post_type_posts_columns_filter( $posts_columns ){
// filter...
return $posts_columns;
}
- $posts_columns(string[])
- An associative array of column headings.
Changelog
| Since 3.0.0 | Introduced. |
Where the hook is called
manage_(post_type)_posts_columns
wp-admin/includes/class-wp-posts-list-table.php 755
return apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );