[wp-trac] [WordPress Trac] #36217: WP_Post_Type class

WordPress Trac noreply at wordpress.org
Thu Mar 17 08:05:15 UTC 2016


#36217: WP_Post_Type class
----------------------------------------------+----------------------------
 Reporter:  swissspidy                        |       Owner:
     Type:  enhancement                       |      Status:  new
 Priority:  normal                            |   Milestone:  Future
Component:  Posts, Post Types                 |  Release
 Severity:  normal                            |     Version:  2.9
 Keywords:  dev-feedback has-patch 4.6-early  |  Resolution:
                                              |     Focuses:
----------------------------------------------+----------------------------

Comment (by swissspidy):

 > Food for thought: Is there value in not locking ourselves into "post
 type" vernacular and instead going with `WP_Content_Type`? There have been
 some mutterings over the years about the missed opportunity in calling
 everything "posts".

 +1 to that. Definitely to be considered.

 ----

 In general, what we get from such a class:

 * Improved documentation on DevHub, moving/copying lots of information out
 of register_taxonomy() into a separate page.
 * Better type hinting thanks to PHPDoc changes.
 * Forward compatibility (think magic getter/setter for deprecated
 arguments, improving the way we handle default values, etc.)
 * Better error prevention
 * Makes adding a REST API endpoint for getting post types easier

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


More information about the wp-trac mailing list