Ticket #22473: 22473.2.patch
File 22473.2.patch, 1.3 KB (added by , 12 years ago) |
---|
-
wp-includes/category-template.php
1062 1062 if ( ! $post = get_post( $post ) ) 1063 1063 return false; 1064 1064 1065 if ( ! is_object_in_taxonomy( $post->post_type, $taxonomy ) )1066 return false;1067 1068 1065 $terms = get_object_term_cache( $post->ID, $taxonomy ); 1069 1066 if ( false === $terms ) { 1070 1067 $terms = wp_get_object_terms( $post->ID, $taxonomy ); -
wp-includes/post.php
615 615 } 616 616 617 617 if ( 'post_category' == $key ) { 618 $terms = get_the_terms( $this, 'category' ); 619 if ( ! $terms ) 618 if ( is_object_in_taxonomy( $this->post_type, 'category' ) ) 619 $terms = get_the_terms( $this, 'category' ); 620 621 if ( empty( $terms ) ) 620 622 return array(); 621 623 622 624 return wp_list_pluck( $terms, 'term_id' ); 623 625 } 624 626 625 627 if ( 'tags_input' == $key ) { 626 $terms = get_the_terms( $this, 'post_tag' ); 627 if ( ! $terms ) 628 if ( is_object_in_taxonomy( $this->post_type, 'post_tag' ) ) 629 $terms = get_the_terms( $this, 'post_tag' ); 630 631 if ( empty( $terms ) ) 628 632 return array(); 629 633 630 634 return wp_list_pluck( $terms, 'name' );