[wp-trac] [WordPress Trac] #36492: Add `WP_Post_Status` class

WordPress Trac noreply at wordpress.org
Thu Apr 28 08:54:12 UTC 2016


#36492: Add `WP_Post_Status` class
------------------------------------+------------------------------
 Reporter:  flixos90                |       Owner:  DrewAPicture
     Type:  enhancement             |      Status:  reviewing
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Posts, Post Types       |     Version:  3.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by swissspidy):

 Replying to [comment:7 flixos90]:
 > Anyway, we should probably discuss this in a broader scope since there
 are also a `WP_Post_Type` and `WP_Taxonomy` class in the making which use
 a similar approach (see #36217 and #36224).
 >

 Sure! Drew mentioned pointed them out to me as well. I have yet to review
 the most recent patches on those tickets though.

 I like the idea of handling arguments in a `get_instance()` method or
 similar. I'm not 100% fond of the current approaches anyway.

 This shouldn't stop us from introducing `WP_Status` in a revised patch.
 Such base class will surely help with handling the arguments in a better
 way, because it makes us think more about it :-)

 > That definitely makes sense. Just for an overview, can you outline to me
 which parts of WordPress have statuses? Not sure atm if there are others
 beside posts and comments. I would also like to broaden this discussion
 for the above two tickets - a post type and a taxonomy (and a comment
 type) are basically "content types", similar to how a post status and a
 comment status are both statuses.

 Posts, comments and users all currently have some kind of statuses. See
 also #36594 and #34316.

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


More information about the wp-trac mailing list