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:
Ryan Boren 2011-02-09 17:13:28 +00:00
parent 40ef969983
commit 4d95849968
1 changed files with 3 additions and 0 deletions

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