WordPress.org

Make WordPress Core

Changeset 13451


Ignore:
Timestamp:
02/27/10 06:45:23 (6 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r13425 r13451  
    670670        $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>'; 
    671671    $posts_columns['date'] = __('Date'); 
    672     // @todo filter per type 
    673     $posts_columns = apply_filters('manage_posts_columns', $posts_columns); 
     672 
     673    if ( 'page' == $post_type ) 
     674        $posts_columns = apply_filters( 'manage_pages_columns', $posts_columns ); 
     675    else 
     676        $post_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type ); 
     677    $post_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns ); 
    674678 
    675679    return $posts_columns; 
Note: See TracChangeset for help on using the changeset viewer.