Set $post_type to 'any' when taxonomies are involved (code resqued from r15613). See #12891

git-svn-id: https://develop.svn.wordpress.org/trunk@15649 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
scribu 2010-09-23 23:11:49 +00:00
parent bf13c1921f
commit 9e37c78da3
1 changed files with 7 additions and 0 deletions

View File

@ -1829,6 +1829,13 @@ class WP_Query {
}
}
}
if ( empty($post_type) ) {
$post_type = 'any';
$post_status_join = true;
} elseif ( in_array('attachment', (array) $post_type) ) {
$post_status_join = true;
}
}
// Category stuff