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:
parent
e46f21c459
commit
adb4f75729
|
@ -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' );
|
||||
|
|
Loading…
Reference in New Issue