mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Don't query the post format for post types that don't support formats. Props nacin. fixes #16503 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6fbe3c685d
commit
3cd43bf6b8
@ -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