Limit post format queries to the post types registered for the taxonomy. see #16149.

git-svn-id: https://develop.svn.wordpress.org/trunk@17249 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2011-01-11 18:30:37 +00:00
parent 9fe67f9a2f
commit dd4329a4bc
1 changed files with 2 additions and 0 deletions

View File

@ -5155,6 +5155,8 @@ function _post_format_request( $qvs ) {
$slugs = array_flip( get_post_format_slugs() );
if ( isset( $slugs[ $qvs['post_format'] ] ) )
$qvs['post_format'] = 'post-format-' . $slugs[ $qvs['post_format'] ];
$tax = get_taxonomy( 'post_format' );
$qvs['post_type'] = $tax->object_type;
return $qvs;
}
add_filter( 'request', '_post_format_request' );