[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 19:41:57 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: closed
Priority: normal | Milestone: 4.4
Component: Taxonomy | Version: trunk
Severity: normal | Resolution: fixed
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+---------------------------
Changes (by boonebgorges):
* owner: => boonebgorges
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"33764"]:
{{{
#!CommitTicketReference repository="" revision="33764"
Introduce `hide_title_if_no_cats` parameter to `wp_list_categories()`.
When generating a `<ul>` using `wp_list_categories()`, a title `<li>`
element
is put at the top of the term list. Current behavior is that this title
`<li>`
appears even when no terms are found. The new `hide_title_if_no_cats`
param
allows developers to specify that the title should be hidden when the term
list
is empty.
Props vilkatis.
Fixes #33460.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33460#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list