[wp-trac] [WordPress Trac] #27487: Clarify the return value of wp_generate_tag_cloud()
WordPress Trac
noreply at wordpress.org
Mon Mar 24 17:09:41 UTC 2014
#27487: Clarify the return value of wp_generate_tag_cloud()
----------------------------+-------------------
Reporter: SergeyBiryukov | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.9
Component: Taxonomy | Version: 2.7
Severity: normal | Resolution:
Keywords: has-patch | Focuses: docs
----------------------------+-------------------
Description changed by SergeyBiryukov:
Old description:
> The function description says that it only returns a string:
> [source:tags/3.8.1/src/wp-includes/category-template.php#L604]
>
> However, it can also return an array, depending on `format` argument:
> [source:tags/3.8.1/src/wp-includes/category-template.php#L680]
>
> It also returns null if `$tags` argument is empty:
> [source: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.
New description:
Background: #27413
The function description says that it only returns a string:
[source:tags/3.8.1/src/wp-includes/category-template.php#L604]
However, it can also return an array, depending on `format` argument:
[source:tags/3.8.1/src/wp-includes/category-template.php#L680]
It also returns null if `$tags` argument is empty:
[source: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.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27487#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list