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-includes/query.php

    r12516 r12597  
    20632063        if ( is_array($post_type) )
    20642064            $post_type_cap = 'multiple_post_type';
    2065         else
    2066             $post_type_cap = $post_type;
     2065        else {
     2066            $post_type_object = get_post_type_object ( $post_type );
     2067            if ( !empty($post_type_object) )
     2068                $post_type_cap = $post_type_object->capability_type;
     2069            else
     2070                $post_type_cap = $post_type;
     2071        }
    20672072
    20682073        $exclude_post_types = '';
Note: See TracChangeset for help on using the changeset viewer.