Return, don't echo, array. Props Otto42. fixes #5155

git-svn-id: http://svn.automattic.com/wordpress/trunk@6616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-01-14 22:35:43 +00:00
parent b7b689e35f
commit b95f8d4459
1 changed files with 8 additions and 2 deletions

View File

@ -321,10 +321,16 @@ function wp_tag_cloud( $args = '' ) {
return; return;
$return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args $return = wp_generate_tag_cloud( $tags, $args ); // Here's where those top tags get sorted according to $args
if ( is_wp_error( $return ) ) if ( is_wp_error( $return ) )
return false; 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() ) // $tags = prefetched tag array ( get_tags() )