Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#37654 closed defect (bug) (fixed)

Documentation for widget_tag_cloud_args filter is wrong

Reported by: swissspidy Owned by: DrewAPicture
Milestone: 4.7 Priority: normal
Severity: normal Version: 2.8
Component: Taxonomy Keywords: good-first-bug has-patch
Focuses: docs Cc:


The docs say that it can be used to filter the taxonomy used in the Tag Cloud widget, but it does way more than that. Not only the taxonomy is being passed to the wp_tag_cloud() function, but instead the whole $args array:

 * Filters the taxonomy used in the Tag Cloud widget.
 * @since 2.8.0
 * @since 3.0.0 Added taxonomy drop-down.
 * @see wp_tag_cloud()
 * @param array $current_taxonomy The taxonomy to use in the tag cloud. Default 'tags'.
$tag_cloud = wp_tag_cloud( apply_filters( 'widget_tag_cloud_args', array(
        'taxonomy' => $current_taxonomy,
        'echo' => false
) ) );

This needs to be reflected in the docs.

Attachments (1)

37654.diff (606 bytes) - added by backermann 5 years ago.

Download all attachments as: .zip

Change History (10)

#1 @DrewAPicture
5 years ago

Second argument added in [34273] for #16125 in 4.4.

#2 @swissspidy
5 years ago

In addition to that, hash notation for the wp_tag_cloud() docblock would be great too.

5 years ago

#3 @backermann
5 years ago

  • Keywords has-patch added; needs-patch removed

Fixed documentation in 37654.diff.

#4 @flixos90
5 years ago

  • Milestone changed from Future Release to 4.7

#5 @jorbin
5 years ago

@DrewAPicture @swissspidy Can you review this one please?

#6 @DrewAPicture
5 years ago

  • Owner set to DrewAPicture
  • Status changed from new to reviewing


This ticket was mentioned in Slack in #core by jeffpaul. View the logs.

5 years ago

This ticket was mentioned in Slack in #core by stevenkword. View the logs.

5 years ago

#9 @DrewAPicture
5 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 39053:

Docs: Fix an incorrect pseudo-parameter referenced in the hook doc for the widget_tag_cloud_args filter.

Props backermann.
Fixes #37654.

Note: See TracTickets for help on using tickets.