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

WordPress Trac noreply at wordpress.org
Tue May 10 18:04:38 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 flixos90):

 [attachment:36492.4.diff] introduces an abstract `WP_Status` class, and
 the `WP_Post_Status` class extends it. I put all properties which should
 also apply to a possible `WP_Comment_Status` and `WP_User_Status` into the
 base class. So for now, all that the `WP_Post_Status` class still takes
 care of are the `exclude_from_search` and `publicly_queryable` properties
 since I feel they are post-specific properties (correct me if I'm wrong
 here).

 For the overall approach, I modified the class to follow the structure
 proposed by @boonebgorges [comment:14:ticket:36217 in the WP_Post_Type
 discussion].

 @DrewAPicture: I wasn't completely sure what would be the best way to
 document the two classes, especially in terms of duplicate docs or unclear
 docs because of the abstraction. These definitely need some review.

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


More information about the wp-trac mailing list