manage_{$post_type}_posts_columns

最后更新于:2021-11-27 06:36:05

apply_filters( “manage_{$post_type}_posts_columns”, string[] $post_columns )

Filters the columns displayed in the Posts list table for a specific post type.

参数

$post_columns

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

源文件

文件: gc-admin/includes/class-gc-posts-list-table.php

View on Trac

function my_custom_columns_list($columns) {
    
    unset( $columns['title']  );
    unset( $columns['author'] );
    unset( $columns['date']   );
    
    $columns['product_number']     = 'Product Number';
    $columns['custom_handler']     = 'Nice name';

	
    return $columns;
}
add_filter( 'manage_product_posts_columns', 'my_custom_columns_list' );