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

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 23 20:15:31 UTC 2012


#14761: unregister_post_type()
-------------------------------------+-----------------------------
 Reporter:  nacin                    |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  lowest                   |   Milestone:  Future Release
Component:  Post Types               |     Version:  2.9
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch 2nd-opinion  |
-------------------------------------+-----------------------------

Comment (by nacin):

 A unregister_post_type() function needs to un-roll quite a bit:
   * Remove the query var from the WP class, if one was registered.
   * Remove registered custom meta capabilities from
 _post_type_meta_capabilities().
   * Remove all post type support.
   * Remove any rewrite tags, permastructs, and rules.
   * Remove the callback for handling any meta boxes.
   * Remove the post type from any taxonomies.
   * Remove the future post hook callback.

 An unregister_post_type() function should disallow the unregistration of
 core post types until core does not make existing assumptions all over the
 place. I'm not sure that will happen any time soon for 'post' and 'page'.
 The other types, revisions, attachments, and nav menu items, should
 probably never be allowed to be unregistered.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14761#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list