From b95f8d445986f54f6103f199d019b5fccf5a1f40 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 14 Jan 2008 22:35:43 +0000 Subject: [PATCH] Return, don't echo, array. Props Otto42. fixes #5155 git-svn-id: http://svn.automattic.com/wordpress/trunk@6616 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/category-template.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 647e651ed5..dd0c71949a 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -321,10 +321,16 @@ function wp_tag_cloud( $args = '' ) { return; $return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args + if ( is_wp_error( $return ) ) return false; - else - echo apply_filters( 'wp_tag_cloud', $return, $args ); + + $return = apply_filters( 'wp_tag_cloud', $return, $args ); + + if ( 'array' == $args['format'] ) + return $return; + + echo $return; } // $tags = prefetched tag array ( get_tags() )