[wp-trac] [WordPress Trac] #31154: register_post_type function does not check reserved post_types

WordPress Trac noreply at wordpress.org
Tue Feb 17 06:27:59 UTC 2015


#31154: register_post_type function does not check reserved post_types
-------------------------------+------------------------------
 Reporter:  sebastiaandegeus   |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+------------------------------

Comment (by tyxla):

 @valendesigns these are disallowed by design, as they are used internally
 by WordPress. You can read more about these three here:
 [http://codex.wordpress.org/Function_Reference/register_post_type#Reserved_Post_Types
 register_post_type#Reserved_Post_Types] - quoting:


 {{{
 In addition, the following post types should not be used as they interfere
 with other WordPress functions.

 action
 order
 theme
 }}}

 In a nutshell, using any of these as the post type's name would conflict
 with the built-in WordPress parameters. The `action` is internally used to
 send a specific action (often in the administration, or in an AJAX call),
 the `order` is a built-in query var for specifying ASC or DESC for a
 query, and the `theme` is internally used by theme installer, editor and
 upgrader in the administration.

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


More information about the wp-trac mailing list