[wp-trac] [WordPress Trac] #27487: Clarify the return value of wp_generate_tag_cloud()

WordPress Trac noreply at wordpress.org
Sat Mar 22 13:31:52 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          |   Keywords:  has-patch
  Focuses:  docs            |
----------------------------+-----------------------
 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>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list