Ticket #22473: 22473.patch
File 22473.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
611 611 } 612 612 613 613 if ( 'post_category' == $key ) { 614 $terms = get_the_terms( $this, 'category' ); 615 if ( ! $terms ) 614 if ( is_object_in_taxonomy( $this->post_type, 'category' ) ) 615 $terms = get_the_terms( $this, 'category' ); 616 else 616 617 return array(); 617 618 618 619 return wp_list_pluck( $terms, 'term_id' ); 619 620 } 620 621 621 622 if ( 'tags_input' == $key ) { 622 $terms = get_the_terms( $this, 'post_tag' ); 623 if ( ! $terms ) 623 if ( is_object_in_taxonomy( $this->post_type, 'post_tag' ) ) 624 $terms = get_the_terms( $this, 'post_tag' ); 625 else 624 626 return array(); 625 627 626 628 return wp_list_pluck( $terms, 'name' );