[wp-trac] [WordPress Trac] #14761: unregister_post_type()

WordPress Trac noreply at wordpress.org
Sat Dec 26 10:00:57 UTC 2015


#14761: unregister_post_type()
-------------------------------------------------+-------------------------
 Reporter:  nacin                                |       Owner:
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  4.5
Component:  Posts, Post Types                    |     Version:  2.9
 Severity:  normal                               |  Resolution:
 Keywords:  early has-patch has-unit-tests dev-  |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by swissspidy):

 * keywords:  needs-patch early => early has-patch has-unit-tests dev-
               feedback
 * milestone:  Future Release => 4.5


Comment:

 [attachment:14761.2.diff] fully implements `unregister_post_type()`. The
 following changed compared to the previous patch:

 * Properly removes the post type from the `$wp_post_types` global
 * Implemented `remove_rewrite_tag()`
 * Replaces `_unregister_post_type()` with the new function everywhere
 * Properly handles post type meta capabilities by storing them in a global
 instead of a static variable

 All unit tests pass, of course.

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


More information about the wp-trac mailing list