WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#9010 closed defect (bug) (invalid)

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

Reported by: 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 5 years ago.

Download all attachments as: .zip

Change History (4)

scribu5 years ago

comment:1 filosofo5 years ago

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

comment:2 follow-up: azaozz5 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;

comment:3 in reply to: ↑ 2 scribu5 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.