Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#13250 closed defect (bug) (invalid)

bad links in wp_generate_tag_cloud

Reported by: luigisa's profile luigisa Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.2
Component: Template Keywords: tag cloud
Focuses: Cc:

Description

function wp_generate_tag_cloud( $tags, $args = ) {

.......

$tag_link = '#' != $tag->link ? esc_url( $tag->link ) : '#';

......

}

link property doesn't exist in the object tag

*

My solution has been:

$tag_link = get_tag_link($tag->term_id);

Change History (1)

#1 @scribu
15 years ago

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

wp_generate_tag_cloud() expects a list of term objects that do contain a link property. See above in wp_tag_cloud():

$tags[ $key ]->link = $link;

You're probably calling wp_generate_tag_cloud() without doing that.

Note: See TracTickets for help on using tickets.