[wp-trac] [WordPress Trac] #16792: CategoryWalker, if cat_name is empty, do not append the empty a tag to the output

WordPress Trac noreply at wordpress.org
Sat Jan 3 01:57:30 UTC 2015


#16792: CategoryWalker, if cat_name is empty, do not append the empty a tag to the
output
-------------------------+------------------
 Reporter:  samo9789     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.2
Component:  Taxonomy     |     Version:  3.1
 Severity:  trivial      |  Resolution:
 Keywords:  has-patch    |     Focuses:
-------------------------+------------------
Changes (by boonebgorges):

 * keywords:  has-patch needs-refresh => has-patch
 * milestone:  Awaiting Review => 4.2


Comment:

 samo9789 - Thanks for the patch, and sorry for the delay in response.

 In general, I would not recommend the use of the 'list_cats' filter for
 this purpose - if you want to prevent terms from being displayed in, say,
 `wp_list_categories()`, you're much better off passing an 'exclude'
 parameter to that function, or filtering 'get_terms'. That being said, I
 think you're right that there's no good reason to generate an empty
 element.

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


More information about the wp-trac mailing list