Make WordPress Core

Changeset 17430


Ignore:
Timestamp:
02/09/2011 05:14:00 PM (16 years ago)
Author:
ryan
Message:

Don't query the post format for post types that don't support formats. Props nacin. fixes #16503 for 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/post.php

    r17403 r17430  
    487487function get_post_format( $post = null ) {
    488488        $post = get_post($post);
     489
     490        if ( ! post_type_supports( $post->post_type, 'post-formats' ) )
     491                return false;
    489492
    490493        $_format = get_the_terms( $post->ID, 'post_format' );
Note: See TracChangeset for help on using the changeset viewer.