Restore manage_pages_columns filter in wp_manage_posts_columns(). Pass post type to manage_posts_columns, and add a manage_{$post_type}_posts_columns filter. fixes #12398

git-svn-id: https://develop.svn.wordpress.org/trunk@13451 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-02-27 06:45:23 +00:00
parent 279f93647a
commit 92c03dc898
1 changed files with 6 additions and 2 deletions

View File

@ -669,8 +669,12 @@ function wp_manage_posts_columns( $screen = '') {
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');
// @todo filter per type
$posts_columns = apply_filters('manage_posts_columns', $posts_columns);
if ( 'page' == $post_type )
$posts_columns = apply_filters( 'manage_pages_columns', $posts_columns );
else
$post_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type );
$post_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns );
return $posts_columns;
}