Ticket #18968: 18968-r25222.patch
| File 18968-r25222.patch, 1.4 KB (added by , 12 years ago) |
|---|
-
wp-admin/includes/taxonomy.php
219 219 if ( !$post_id ) 220 220 return false; 221 221 222 $tags = wp_get_post_terms($post_id, $taxonomy, array());222 $tags = get_the_terms( $post_id, $taxonomy ); 223 223 224 224 if ( !$tags ) 225 225 return false; -
wp-admin/includes/template.php
275 275 $taxonomy = get_taxonomy( $taxonomy_name ); 276 276 277 277 if ( $taxonomy->hierarchical && $taxonomy->show_ui ) { 278 echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' 279 . implode( ',', wp_get_object_terms( $post->ID, $taxonomy_name, array( 'fields' => 'ids' ) ) ) . '</div>'; 278 279 $terms = get_the_terms( $post->ID, $taxonomy_name ); 280 $term_ids = empty( $terms ) ? array() : wp_list_pluck( $terms, 'term_id' ); 281 282 echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' . implode( ',', $term_ids ) . '</div>'; 283 280 284 } elseif ( $taxonomy->show_ui ) { 285 281 286 echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">' 282 287 . esc_html( str_replace( ',', ', ', get_terms_to_edit( $post->ID, $taxonomy_name ) ) ) . '</div>'; 288 283 289 } 284 290 } 285 291