manage_pages_columns

最后更新于:2021-11-27 05:58:27

apply_filters( ‘manage_pages_columns’, string[] $post_columns )

Filters the columns displayed in the Pages list table.

参数

$post_columns

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

源文件

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

View on Trac

add_filter( 'manage_pages_columns', 'my_custom_pages_columns' );

function my_custom_pages_columns( $columns ) {

	/** Add a Thumbnail Column **/
	$myCustomColumns = array(
		'thumbnail' => __( 'Thumbnail', 'Aternus' )
	);
	$columns = array_merge( $columns, $myCustomColumns );

	/** Remove a Author, Comments Columns **/
	unset(
		$columns['author'],
		$columns['comments']
	);

	return $columns;
}