Filter hook 'manage_{$post_type}_posts_columns'

in WP Core File wp-admin/includes/class-wp-posts-list-table.php at line 756

View Source

manage_{$post_type}_posts_columns

Filter Hook
Description
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: - `manage_post_posts_columns` - `manage_page_posts_columns`

Hook Information

File Location wp-admin/includes/class-wp-posts-list-table.php View on GitHub
Hook Type Filter
Line Number 756

Hook Parameters

Type Name Description
string[] $posts_columns An associative array of column headings.

Usage Examples

Basic Usage
<?php
// Hook into manage_{$post_type}_posts_columns
add_filter('manage_{$post_type}_posts_columns', 'my_custom_filter', 10, 1);

function my_custom_filter($posts_columns) {
    // Your custom filtering logic here
    return $posts_columns;
}

Source Code Context

wp-admin/includes/class-wp-posts-list-table.php:756 - How this hook is used in WordPress core
<?php
 751  		 *
 752  		 * @since 3.0.0
 753  		 *
 754  		 * @param string[] $posts_columns An associative array of column headings.
 755  		 */
 756  		return apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
 757  	}
 758  
 759  	/**
 760  	 * @return array
 761  	 */

PHP Documentation

<?php
/**
		 * 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:
		 *
		 *  - `manage_post_posts_columns`
		 *  - `manage_page_posts_columns`
		 *
		 * @since 3.0.0
		 *
		 * @param string[] $posts_columns An associative array of column headings.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-admin/includes/class-wp-posts-list-table.php
Related Hooks

Related hooks will be displayed here in future updates.