manage_posts_columns
Filter HookDescription
Filters the columns displayed in the Posts list table.Hook Information
File Location |
wp-admin/includes/class-wp-posts-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 739 |
Hook Parameters
Type | Name | Description |
---|---|---|
string[]
|
$posts_columns
|
An associative array of column headings. |
string
|
$post_type
|
The post type slug. |
Usage Examples
Basic Usage
<?php
// Hook into manage_posts_columns
add_filter('manage_posts_columns', 'my_custom_filter', 10, 2);
function my_custom_filter($posts_columns, $post_type) {
// Your custom filtering logic here
return $posts_columns;
}
Source Code Context
wp-admin/includes/class-wp-posts-list-table.php:739
- How this hook is used in WordPress core
<?php
734 * @since 1.5.0
735 *
736 * @param string[] $posts_columns An associative array of column headings.
737 * @param string $post_type The post type slug.
738 */
739 $posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
740 }
741
742 /**
743 * Filters the columns displayed in the Posts list table for a specific post type.
744 *
PHP Documentation
<?php
/**
* Filters the columns displayed in the Posts list table.
*
* @since 1.5.0
*
* @param string[] $posts_columns An associative array of column headings.
* @param string $post_type The post type slug.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/class-wp-posts-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.