Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#9010 closed defect (bug) (invalid)

wp_tag_cloud() should not echo if format='array'

Reported by: scribu's profile scribu Owned by:
Milestone: Priority: normal
Severity: minor Version: 2.7
Component: General Keywords: has-patch
Focuses: Cc:

Description

The title says it all.

Attachments (1)

wp_tag_cloud.patch (346 bytes) - added by scribu 15 years ago.

Download all attachments as: .zip

Change History (4)

#1 @filosofo
15 years ago

It doesn't currently, because if it returns, it will never get to the echo.

#2 follow-up: @azaozz
15 years ago

Filosofo is right, if it's set as array in $args, it returns it before getting to the echo anyways. Perhaps can add another arg there

if ( 'array' == $args['format'] || ( isset($args['return']) && $args['return'] ) )
    return $return;

#3 in reply to: ↑ 2 @scribu
15 years ago

  • Milestone 2.7.1 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Replying to azaozz:

Filosofo is right, if it's set as array in $args, it returns it before getting to the echo anyways. Perhaps can add another arg there

if ( 'array' == $args['format'] || ( isset($args['return']) && $args['return'] ) )
    return $return;

No, no need for an extra arg. My bad.

Note: See TracTickets for help on using tickets.