From 87228751366961ba85d79cd41e9a9e2789b5563e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 4 Jun 2010 19:18:09 +0000 Subject: [PATCH] Don't call wp_tag_cloud() at all for hierarchical taxonomies. git-svn-id: https://develop.svn.wordpress.org/trunk@15141 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-tags.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index 5e2ea6450e..898afc34c9 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -355,19 +355,22 @@ do_action('after-' . $taxonomy . '-table', $taxonomy);
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 ) : + ?>

labels->popular_items; ?>

cap->edit_terms) ) { if ( 'category' == $taxonomy )