Make WordPress Core


Ignore:
Timestamp:
11/20/2012 06:31:06 PM (12 years ago)
Author:
ryan
Message:

Don't bail from get_the_terms() if the post type is not registed for the taxonomy. This can break back compat when add_post_type_support( 'page', 'post-formats' ) is called but register_taxonomy_for_object_type( 'postr_-format', 'page' ) is not.

Props SergeyBiryukov
fixes #22473

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/category-template.php

    r22412 r22722  
    10631063        return false;
    10641064
    1065     if ( ! is_object_in_taxonomy( $post->post_type, $taxonomy ) )
    1066         return false;
    1067 
    10681065    $terms = get_object_term_cache( $post->ID, $taxonomy );
    10691066    if ( false === $terms ) {
Note: See TracChangeset for help on using the changeset viewer.