Ticket #18968: 18968.patch
| File 18968.patch, 1.5 KB (added by , 14 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
265 265 foreach ( $taxonomy_names as $taxonomy_name) { 266 266 $taxonomy = get_taxonomy( $taxonomy_name ); 267 267 268 if ( $taxonomy->hierarchical && $taxonomy->show_ui ) 269 echo '<div class="post_category" id="'.$taxonomy_name.'_'.$post->ID.'">' . implode( ',', wp_get_object_terms( $post->ID, $taxonomy_name, array('fields'=>'ids')) ) . '</div>'; 270 elseif ( $taxonomy->show_ui ) 268 if ( $taxonomy->hierarchical && $taxonomy->show_ui ) { 269 $terms = get_the_terms( $post->ID, $taxonomy_name ); 270 $term_ids = !empty( $terms ) ? wp_list_pluck( $terms, 'term_id' ) : array(); 271 echo '<div class="post_category" id="'.$taxonomy_name.'_'.$post->ID.'">' . implode( ',', $term_ids ) . '</div>'; 272 } elseif ( $taxonomy->show_ui ) { 271 273 echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">' . esc_html( str_replace( ',', ', ', get_terms_to_edit($post->ID, $taxonomy_name) ) ) . '</div>'; 274 } 272 275 } 273 276 274 277 if ( !$post_type_object->hierarchical )