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

git-svn-id: http://svn.automattic.com/wordpress/trunk@17249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-01-11 18:30:37 +00:00
parent e46f21c459
commit adb4f75729
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' );