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:
parent
9fe67f9a2f
commit
dd4329a4bc
@ -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
Block a user