[wp-trac] [WordPress Trac] #36224: WP_Taxonomy class

WordPress Trac noreply at wordpress.org
Sun Mar 13 10:28:33 UTC 2016


#36224: WP_Taxonomy class
-------------------------+-------------------------------------------------
 Reporter:  swissspidy   |      Owner:
     Type:  defect       |     Status:  new
  (bug)                  |  Milestone:  Awaiting Review
 Priority:  normal       |    Version:
Component:  Taxonomy     |   Keywords:  has-patch has-unit-tests dev-
 Severity:  normal       |  feedback
  Focuses:               |
-------------------------+-------------------------------------------------
 In a similar vein to #36217, a `WP_Taxonomy` class would make many things
 easier, like helping with documentation and preventing accidental errors.

 In my proof-of-concept patch, the global `$wp_taxonomies` would be an
 array of `WP_Taxonomy` objects. The class properties wouldn't change for
 backward compatibility and any class methods would only add some benefit
 to it.

 I also implemented the `ArrayAccess` interface because the taxonomy args
 are often passed as arrays (e.g. in the `registered_taxonomy` filter.

 This ticket should:
 * Introduce the `WP_Taxonomy` class and have base properties and methods
 for interacting with a post type object.
 * Apply the new class where it can be used within core.
 * Provide tests for any methods introduced.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36224>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list