WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/04/2010 04:58:43 PM (10 years ago)
Author:
ryan
Message:

More custom post type support. Props scribu. see #9674

File:
1 edited

Legend:

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

    r12513 r12597  
    847847    }
    848848
     849    $post_type_q = 'post_type=post';
     850    if ( isset($q['post_type']) && in_array( $q['post_type'], get_post_types( array('_show' => true) ) ) )
     851        $post_type_q = 'post_type=' . $q['post_type'];
     852
     853
    849854    $posts_per_page = (int) get_user_option( 'edit_per_page', 0, false );
    850855    if ( empty( $posts_per_page ) || $posts_per_page < 1 )
     
    852857    $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page );
    853858
    854     wp("post_type=post&$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby");
     859    wp("$post_type_q&$post_status_q&posts_per_page=$posts_per_page&order=$order&orderby=$orderby");
    855860
    856861    return array($post_stati, $avail_post_stati);
Note: See TracChangeset for help on using the changeset viewer.