Make WordPress Core

Changeset 17429


Ignore:
Timestamp:
02/09/2011 05:13:28 PM (13 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r17402 r17429  
    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.