Add echo arg to tag cloud. Props DD32. fixes #5710

git-svn-id: https://develop.svn.wordpress.org/trunk@10946 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-16 17:32:06 +00:00
parent eef293ff04
commit c600d21efa
1 changed files with 2 additions and 2 deletions

View File

@ -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;