From 0066076858de17ff81cce0d17b9ce994bbf639b4 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 11 Feb 2009 23:41:29 +0000 Subject: [PATCH] Add taxonomy argument to wp_tag_cloud() git-svn-id: https://develop.svn.wordpress.org/trunk@10554 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-tags.php | 4 ++-- wp-includes/category-template.php | 8 ++++---- wp-includes/link-template.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index df22448f6c..9a3326474d 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -244,9 +244,9 @@ if ( $page_links )

'edit')); + wp_tag_cloud(array('taxonomy' => $taxonomy, 'link' => 'edit')); else - wp_tag_cloud(); + wp_tag_cloud(array('taxonomy' => $taxonomy)); ?> diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 5d2240d0ba..cb821a31dc 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -560,20 +560,20 @@ function wp_tag_cloud( $args = '' ) { $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, 'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC', - 'exclude' => '', 'include' => '', 'link' => 'view' + 'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag' ); $args = wp_parse_args( $args, $defaults ); - $tags = get_tags( array_merge( $args, array( 'orderby' => 'count', 'order' => 'DESC' ) ) ); // Always query top tags + $tags = get_terms( $args['taxonomy'], array_merge( $args, array( 'orderby' => 'count', 'order' => 'DESC' ) ) ); // Always query top tags if ( empty( $tags ) ) return; foreach ( $tags as $key => $tag ) { if ( 'edit' == $args['link'] ) - $link = get_edit_tag_link( $tag->term_id ); + $link = get_edit_tag_link( $tag->term_id, $args['taxonomy'] ); else - $link = get_tag_link( $tag->term_id ); + $link = get_term_link( $tag->term_id, $args['taxonomy'] ); if ( is_wp_error( $link ) ) return false; diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 05e7c0f8c6..927854cfef 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -575,7 +575,7 @@ function get_tag_feed_link($tag_id, $feed = '') { * @return string */ function get_edit_tag_link( $tag_id = 0, $taxonomy = 'post_tag' ) { - $tag = get_term($tag_id, 'post_tag'); + $tag = get_term($tag_id, $taxonomy); if ( !current_user_can('manage_categories') ) return;