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:
parent
b7b689e35f
commit
b95f8d4459
|
@ -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() )
|
||||
|
|
Loading…
Reference in New Issue