WordPress.org

Make WordPress Core

Changeset 13160


Ignore:
Timestamp:
02/15/10 09:05:56 (4 years ago)
Author:
nacin
Message:

Only show "Popular Terms" header when there is a tag cloud to show. see #11838

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-tags.php

    r13081 r13160  
    303303<div class="col-wrap"> 
    304304 
     305<?php 
     306if ( current_user_can( $tax->edit_cap ) ) 
     307    $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false, 'link' => 'edit' ) ); 
     308else 
     309    $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) ); 
     310 
     311if ( $tag_cloud ) : 
     312?> 
    305313<div class="tagcloud"> 
    306314<h3><?php printf(_x('Popular %s', '%s: plural taxonomy name'), $tax->label); ?></h3> 
    307 <?php 
    308 if ( current_user_can($tax->edit_cap) ) 
    309     wp_tag_cloud(array('taxonomy' => $taxonomy, 'link' => 'edit')); 
    310 else 
    311     wp_tag_cloud(array('taxonomy' => $taxonomy)); 
    312 ?> 
    313 </div> 
    314  
    315 <?php 
     315<?php echo $tag_cloud; unset( $tag_cloud ); ?> 
     316</div> 
     317<?php 
     318endif; 
     319 
    316320if ( current_user_can($tax->edit_cap) ) { 
    317321    if ( 'category' == $taxonomy ) 
Note: See TracChangeset for help on using the changeset viewer.