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:
ryan 2011-02-09 17:13:28 +00:00
parent 6fbe3c685d
commit 3cd43bf6b8

View File

@ -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 ) )