[wp-trac] [WordPress Trac] #27918: get_taxonomies() on single post type should return taxonomies registered on multiple post types

WordPress Trac noreply at wordpress.org
Wed Oct 14 02:16:46 UTC 2015


#27918: get_taxonomies() on single post type should return taxonomies registered on
multiple post types
-------------------------------------------------+-------------------------
 Reporter:  johnrork                             |       Owner:
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:
Component:  Taxonomy                             |     Version:  3.0
 Severity:  normal                               |  Resolution:  wontfix
 Keywords:  needs-unit-tests needs-refresh       |     Focuses:
  needs-patch                                    |
-------------------------------------------------+-------------------------
Changes (by boonebgorges):

 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Future Release =>


Comment:

 So, I've been thinking this over some more. In the same way that making a
 general change to `wp_list_filter()` will break certain legitimate
 filters, my suggested fix will make it impossible to do certain legitimate
 filters on taxonomies. What if I want to find all the taxonomies that are
 exclusive to 'post'?

 More generally, the suggested change breaks the general pattern of
 functions that use `wp_list_filter()` internally, by treating one of the
 filters as a special case. I think that's a bad idea.

 As noted in [comment:4],`get_object_taxonomies()` is really meant for this
 very purpose, so it should be used instead.

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


More information about the wp-trac mailing list