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

WordPress Trac noreply at wordpress.org
Wed Apr 8 03:26:48 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                                  |     Focuses:
-------------------------------------------------+-------------------------
Changes (by hrishiv90):

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


Comment:

 Hi,

 As per @boonebgorges suggestion, I have updated the patch to handle all
 types of conditions as to check if more than one object_type and first one
 either has_archive enabled or disabled with continuing the check on
 further object types (post_type).

 I used array_shift instead of normal indexing ($object_type[$i]) in the
 loop as the array obtained from taxonomy->object_type may start from any
 number as index instead of fixed number 0 depending on the post_types
 taxonomy has been registered with.

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


More information about the wp-trac mailing list