From bc5d21252e7218565ab6572ae9d255bffb8b1cc3 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 16 Apr 2009 17:32:06 +0000 Subject: [PATCH] Add echo arg to tag cloud. Props DD32. fixes #5710 git-svn-id: http://svn.automattic.com/wordpress/trunk@10946 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index b178dee09..c204ba60f 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -522,7 +522,7 @@ 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', 'taxonomy' => 'post_tag' + 'exclude' => '', 'include' => '', 'link' => 'view', 'taxonomy' => 'post_tag', 'echo' => true ); $args = wp_parse_args( $args, $defaults ); @@ -547,7 +547,7 @@ function wp_tag_cloud( $args = '' ) { $return = apply_filters( 'wp_tag_cloud', $return, $args ); - if ( 'array' == $args['format'] ) + if ( 'array' == $args['format'] || empty($args['echo']) ) return $return; echo $return;