[wp-trac] [WordPress Trac] #33460: wp_list_categories should display title_li only if the $categories is not empty , or have an option to hide it if $categories is empty

WordPress Trac noreply at wordpress.org
Wed Aug 26 22:02:13 UTC 2015


#33460: wp_list_categories should display title_li only if the $categories is not
empty , or have an option to hide it if $categories is empty
-----------------------------------+---------------------------
 Reporter:  vilkatis               |       Owner:  boonebgorges
     Type:  enhancement            |      Status:  reopened
 Priority:  normal                 |   Milestone:  4.4
Component:  Taxonomy               |     Version:  trunk
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+---------------------------
Changes (by DrewAPicture):

 * keywords:  good-first-bug has-patch => has-patch 2nd-opinion
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'd like to suggest that we change the name of the new argument to
 `hide_title_if_empty`. This does two things:

 1. It's gets us away from pigeonholing the argument to categories,
 especially since this function can be used with other taxonomies
 2. It follows more closely with the naming scheme of other "empty"-related
 arguments.


 On point !#1, if/when we move to taxonomy-agnostic namespacing, this would
 be one less thing we'd have to account for if/when `wp_list_categories()`
 becomes a wrapper for a `wp_list_terms()` function, for instance. Plus I
 think it's just clearer all around.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33460#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list