Ticket #36964: 36964.patch
File 36964.patch, 1.4 KB (added by , 8 years ago) |
---|
-
wp-admin/edit-tags.php
533 533 </form></div> 534 534 <?php } 535 535 536 if ( ! is_null( $tax->labels->popular_items ) ) { 536 $show_admin_popular_items = ! is_null( $tax->labels->popular_items ); 537 538 /** 539 * Filters whether to show the popular items tag cloud in the taxonomy admin screen. 540 * 541 * This filter controls the visibility of the popular items tag cloud in the 542 * taxonomy admin screen. 543 * 544 * By default, the tag cloud is visible on non-hierarchy taxonomies admin pages. 545 * You can hide it using `__return_false`. 546 * 547 * @since 4.6.0 548 * 549 * @param bool $show_admin_popular_items Whether to show the popular items tag cloud. 550 */ 551 if ( apply_filters( 'show_admin_popular_items_tag_cloud', $show_admin_popular_items ) ) { 537 552 if ( current_user_can( $tax->cap->edit_terms ) ) { 538 553 $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) ); 539 554 } else { … … 540 555 $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); 541 556 } 542 557 543 if ( $tag_cloud ) :544 558 if ( $tag_cloud ) { 559 ?> 545 560 <div class="tagcloud"> 546 561 <h2><?php echo $tax->labels->popular_items; ?></h2> 547 562 <?php echo $tag_cloud; unset( $tag_cloud ); ?> 548 563 </div> 549 564 <?php 550 endif;565 } 551 566 } 552 567 553 568 ?>