W3cubDocs

/WordPress

apply_filters( 'manage_posts_columns', string[] $post_columns, string $post_type )

Filters the columns displayed in the Posts list table.

Parameters

$post_columns

(string[]) An associative array of column headings.

$post_type

(string) The post type slug.

More Information

  • 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.
  • Built-in Column Types
    Listed in order of appearance. By default, all columns supported by the post type are shown.
    • cb Checkbox for bulk actions.
    • title 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.
    • author Post author.
    • categories Categories the post belongs to.
    • tags Tags for the post.
    • comments Number of pending comments.
    • date The date and publish status of the post.

Source

File: wp-admin/includes/class-wp-posts-list-table.php

View on Trac

Changelog

Version Description
1.5.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/manage_posts_columns