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

git-svn-id: https://develop.svn.wordpress.org/trunk@12597 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-01-04 16:58:43 +00:00
parent 170b14f97d
commit 9ef2cb198f
20 changed files with 292 additions and 102 deletions

View File

@@ -2062,8 +2062,13 @@ class WP_Query {
if ( is_array($post_type) )
$post_type_cap = 'multiple_post_type';
else
$post_type_cap = $post_type;
else {
$post_type_object = get_post_type_object ( $post_type );
if ( !empty($post_type_object) )
$post_type_cap = $post_type_object->capability_type;
else
$post_type_cap = $post_type;
}
$exclude_post_types = '';
foreach ( get_post_types( array('exclude_from_search' => true) ) as $_wp_post_type )