From a4d9ebdd9b4879fe3918ec1f5f322e6bcc9b3a4f Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@15141 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 5e2ea6450..898afc34c 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 )