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

WordPress Trac noreply at wordpress.org
Sun May 15 15:08:22 UTC 2016


#36217: WP_Post_Type class
-----------------------------------------------------+------------------
 Reporter:  swissspidy                               |       Owner:
     Type:  enhancement                              |      Status:  new
 Priority:  normal                                   |   Milestone:  4.6
Component:  Posts, Post Types                        |     Version:  2.9
 Severity:  normal                                   |  Resolution:
 Keywords:  dev-feedback has-patch needs-unit-tests  |     Focuses:
-----------------------------------------------------+------------------
Changes (by swissspidy):

 * keywords:  dev-feedback has-patch => dev-feedback has-patch needs-unit-
     tests


Comment:

 In [attachment:36217.4.diff] I re-iterated on the functionality based on
 the previous comments.

 I split everything up into little helper methods to make the code more
 readable.

 Instead of a `start()` method I kept the method calls inside
 `(un)register_post_type()` because some stuff needs to happen before
 `$wp_post_types[ $post_type ] = $post_type_object;` and some after that
 line.

 Regarding the abstract class, I think we shouldn't do that just yet, for
 the same reasons as in #36492.

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


More information about the wp-trac mailing list