manage_{$post_type}_posts_columns WordPress Filter Hook
The manage_{$post_type}_posts_columns hook is called when the list of posts for a particular post type is being displayed in the admin interface. This hook allows you to add or remove columns from the list of posts, as well as modify the contents of the columns.
apply_filters( "manage_{$post_type}_posts_columns", string[] $post_columns ) #
Filters the columns displayed in the Posts list table for a specific post type.
Description
The dynamic portion of the hook name, $post_type
, refers to the post type slug.
Possible hook names include:
manage_post_posts_columns
manage_page_posts_columns
Parameters
- $post_columns
(string[])An associative array of column headings.
More Information
$post_columns is an associative array of “column name” ⇒ “label”. The “column name” is passed to callback functions to identify the column. The “label” is shown as the column header.
Built-in Column Types:
Note: 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
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |