[wp-trac] [WordPress Trac] #21881: wp_list_categories show_option_all does not work for custom taxonomy

WordPress Trac noreply at wordpress.org
Fri Jan 30 01:46:39 UTC 2015


#21881: wp_list_categories show_option_all does not work for custom taxonomy
-------------------------------------------------+-------------------------
 Reporter:  arkinex                              |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Taxonomy                             |  Release
 Severity:  normal                               |     Version:
 Keywords:  needs-unit-tests good-first-bug      |  Resolution:
  needs-testing needs-patch                      |     Focuses:
-------------------------------------------------+-------------------------
Changes (by boonebgorges):

 * keywords:  needs-unit-tests good-first-bug needs-testing => needs-unit-
     tests good-first-bug needs-testing needs-patch


Comment:

 stevegrunwell - Thanks for working on this. The approach in the patch
 looks mostly good to me. The only change I'll suggest is that when a
 taxonomy is associated with more than one post type, we should still try
 to do something intelligent with it, even if it's just grabbing the first
 member of `object_type` that `has_archive`.

 I wrote a few unit tests for the existing behavior in [31301]. Perhaps you
 could use them as a template for additional tests that describe the
 current bug. Off the top of my head, the cases seem like this: (a) more
 than one `object_type` and the first one `has_archive`; (b) more than one
 `object_type` and the first one does *not* `has_archive`; (c) none of the
 `object_type`s `has_archive`.

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


More information about the wp-trac mailing list