Don't call wp_tag_cloud() at all for hierarchical taxonomies.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-06-04 19:18:09 +00:00
parent b5ed0f428a
commit a4d9ebdd9b
1 changed files with 9 additions and 6 deletions

View File

@ -355,19 +355,22 @@ do_action('after-' . $taxonomy . '-table', $taxonomy);
<div class="col-wrap">
<?php
if ( current_user_can( $tax->cap->edit_terms ) )
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false, 'link' => 'edit' ) );
else
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
if ( $tag_cloud && !is_taxonomy_hierarchical($taxonomy) ) :
?>
if ( !is_taxonomy_hierarchical($taxonomy) ) {
if ( current_user_can( $tax->cap->edit_terms ) )
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false, 'link' => 'edit' ) );
else
$tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'echo' => false ) );
if ( $tag_cloud ) :
?>
<div class="tagcloud">
<h3><?php echo $tax->labels->popular_items; ?></h3>
<?php echo $tag_cloud; unset( $tag_cloud ); ?>
</div>
<?php
endif;
}
if ( current_user_can($tax->cap->edit_terms) ) {
if ( 'category' == $taxonomy )