#27487 closed defect (bug) (fixed)
Clarify the return value of wp_generate_tag_cloud()
Reported by: | SergeyBiryukov | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | Taxonomy | Keywords: | has-patch commit |
Focuses: | docs | Cc: |
Description (last modified by )
Background: #27413
The function description says that it only returns a string:
tags/3.8.1/src/wp-includes/category-template.php#L604
However, it can also return an array, depending on format
argument:
tags/3.8.1/src/wp-includes/category-template.php#L680
It also returns null if $tags
argument is empty:
tags/3.8.1/src/wp-includes/category-template.php#L626
I think it should only return a string or an array, for consistency with the format
argument.
Attachments (3)
Change History (10)
Note: See
TracTickets for help on using
tickets.
The verbiage of
return $return
is not my favorite, even though it's already in use at the end of the function. Would be nice if it were something like$output
instead.That said, I agree about returning only a string or array.