wp_manage_posts_columns

Definition:
function wp_manage_posts_columns( $screen = '') {}

Parameters

  • $screen

Defined filters

  • manage_pages_columns
    apply_filters( 'manage_pages_columns', $posts_columns )
  • manage_posts_columns
    apply_filters( 'manage_posts_columns', $posts_columns, $post_type )
  • manage_{$post_type}_posts_columns
    apply_filters( "manage_{$post_type}_posts_columns", $posts_columns )

Source code

function wp_manage_posts_columns( $screen = '') {

	if ( empty($screen) )

		$post_type = 'post';

	else

		$post_type = $screen->post_type;



	$posts_columns = array();

	$posts_columns['cb'] = '<input type="checkbox" />';

	/* translators: manage posts column name */

	$posts_columns['title'] = _x('Title', 'column name');

	$posts_columns['author'] = __('Author');

	if ( empty($post_type) || is_object_in_taxonomy($post_type, 'category') )

		$posts_columns['categories'] = __('Categories');

	if ( empty($post_type) || is_object_in_taxonomy($post_type, 'post_tag') )

		$posts_columns['tags'] = __('Tags');

	$post_status = !empty($_REQUEST['post_status']) ? $_REQUEST['post_status'] : 'all';

	if ( !in_array( $post_status, array('pending', 'draft', 'future') ) && ( empty($post_type) || post_type_supports($post_type, 'comments') ) )

		$posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>';

	$posts_columns['date'] = __('Date');



	if ( 'page' == $post_type )

		$posts_columns = apply_filters( 'manage_pages_columns', $posts_columns );

	else

		$posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );

	$posts_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );

3901

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: