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

WordPress Trac noreply at wordpress.org
Thu Oct 6 06:40:07 UTC 2016


#36224: WP_Taxonomy class
-------------------------------------------------+-------------------------
 Reporter:  swissspidy                           |       Owner:  swissspidy
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.7
Component:  Taxonomy                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback 4.7-early                             |
-------------------------------------------------+-------------------------

Comment (by swissspidy):

 Replying to [comment:20 boonebgorges]:
 > What is the purpose of the `/* @var WP $wp */` blocks? For an IDE?

 Yeah, it's for the IDE. Rarely used in core, so I can remove it if
 unwanted.

 > What are the aspects of `WP_Post_Type` that people don't like? Is there
 something in the thread at #36217?

 Mostly on twitter. tl;dr: final keyword, no interface, mutable, should use
 `__get()` and `__set()` instead of plenty of properties and `set_props()`.

 > In the future, it may make sense to move functionality into the class,
 especially functionality that's used only when taxonomies are registered.
 Stuff like `get_taxonomy_labels()`.

 Agreed. See #37667 and #38218 for post type examples.

 > Do we want to set a `$db` property instead of calling `$wpdb`? See
 #37699.

 Not really a fan of that. See [comment:83:ticket:37699]

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


More information about the wp-trac mailing list