From 3cd43bf6b86bfe85745aa6ee78c8d8663ef5d632 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 9 Feb 2011 17:13:28 +0000 Subject: [PATCH] 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 --- wp-includes/post.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/post.php b/wp-includes/post.php index b94916dc24..0acf6414e7 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 ) )