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

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 14 22:45:41 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 johnbillion):

 I'm currently looking into whether it's workable to unregister the 'post'
 post type on a site. Two related issues I've found with unregistering post
 types:

  1. Any associated taxonomies should probably also be unregistered when
 unregistering a post type.
  2. The 'Right Now' dashboard widget has hardcoded output for posts,
 pages, categories and tags. These should only be shown if the
 corresponding post type / taxonomy is actually registered. I suspect there
 are other areas like this, this is the first one I've noticed.

 Replying to [comment:8 johnkolbert]:
 > What about doing something like this: https://gist.github.com/769160
 You'd only need `remove_menu_page()` in there if you were unregistering a
 post type after the menu has been built. I'd say -1 on this, you should
 unregister post types on the 'init' hook (albeit probably with a later
 priority than normal).

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


More information about the wp-trac mailing list