Don't query the post format for post types that don't support formats. Props nacin. fixes #16503 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@17429 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
40ef969983
commit
4d95849968
@ -487,6 +487,9 @@ function get_post_mime_type($ID = '') {
|
||||
function get_post_format( $post = null ) {
|
||||
$post = get_post($post);
|
||||
|
||||
if ( ! post_type_supports( $post->post_type, 'post-formats' ) )
|
||||
return false;
|
||||
|
||||
$_format = get_the_terms( $post->ID, 'post_format' );
|
||||
|
||||
if ( empty( $_format ) )
|
||||
|
Loading…
Reference in New Issue
Block a user