Codex tools: Log in
Contents |
manage_posts_columns is a filter applied to the columns shown on the manage posts screen. It's applied to posts of all types except pages. To add a custom column for pages, hook the manage_pages_columns filter. To add a custom column for specific custom post types, hook the manage_$post_type_posts_columns filter.
Note: Listed in order of appearance. By default, all columns supported by the post type are shown.
Post title.
Includes "edit", "quick edit", "trash" and "view" links. If $mode (set from $_REQUEST['mode']) is 'excerpt', a post excerpt is included between the title and links.
To add a column showing whether a post is sticky or not:
function add_sticky_column($columns) {
return array_merge( $columns,
array('sticky' => __('Sticky')) );
}
add_filter('manage_posts_columns' , 'add_sticky_column');
To actually display whether or not a post is sticky, hook the manage_posts_custom_column action.
Since: 3.1
manage_${post_type}_posts_columns is applied by WP_Posts_List_Table->get_columns in wp-admin/includes/class-wp-posts-list-table.php.