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
This commit is contained in:
ryan 2009-04-16 17:32:06 +00:00
parent 08ae2f5ee2
commit bc5d21252e
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;