Changeset 28561 for trunk/src/wp-admin/includes/template.php
- Timestamp:
- 05/23/2014 07:28:45 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r28514 r28561 365 365 366 366 if ( $taxonomy->hierarchical && $taxonomy->show_ui ) { 367 echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' 368 . implode( ',', wp_get_object_terms( $post->ID, $taxonomy_name, array( 'fields' => 'ids' ) ) ) . '</div>'; 367 368 $terms = get_object_term_cache( $post->ID, $taxonomy_name ); 369 if ( false === $terms ) { 370 $terms = wp_get_object_terms( $post->ID, $taxonomy_name ); 371 wp_cache_add( $post->ID, $terms, $taxonomy_name . '_relationships' ); 372 } 373 $term_ids = empty( $terms ) ? array() : wp_list_pluck( $terms, 'term_id' ); 374 375 echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' . implode( ',', $term_ids ) . '</div>'; 376 369 377 } elseif ( $taxonomy->show_ui ) { 378 370 379 echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">' 371 380 . esc_html( str_replace( ',', ', ', get_terms_to_edit( $post->ID, $taxonomy_name ) ) ) . '</div>'; 381 372 382 } 373 383 }
Note: See TracChangeset
for help on using the changeset viewer.