[wp-trac] [WordPress Trac] #37654: Documentation for widget_tag_cloud_args filter is wrong
WordPress Trac
noreply at wordpress.org
Sun Aug 14 09:37:39 UTC 2016
#37654: Documentation for widget_tag_cloud_args filter is wrong
--------------------------+----------------------------------------
Reporter: swissspidy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version: 2.8
Severity: normal | Keywords: needs-patch good-first-bug
Focuses: docs |
--------------------------+----------------------------------------
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:
{{{#!php
<?php
/**
* 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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37654>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list