[wp-trac] [WordPress Trac] #14649: Throw error when registering a Post Type longer than 20 chars

WordPress Trac wp-trac at lists.automattic.com
Thu Aug 19 21:22:16 UTC 2010


#14649: Throw error when registering a Post Type longer than 20 chars
--------------------------+-------------------------------------------------
 Reporter:  batmoo        |       Owner:                 
     Type:  defect (bug)  |      Status:  new            
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Post Types    |     Version:                 
 Severity:  normal        |    Keywords:                 
--------------------------+-------------------------------------------------
 From [http://tekartist.org/2010/08/18/wordpress-custom-post-types-catch/
 stephdau's blog post]:

 {{{
 When dealing with WordPress custom post types, be sure that the
 namespace/value you use as an identifier for your post_type is less then
 or equal to 20 characters. The DB column which holds the said value is a
 varchar(20).
 }}}

 WordPress should throw either a PHP Notice or an admin_notices error
 warning that the post type name cannot be longer than 20 characters and
 fail to register the post type.

 Also applies to register_post_status.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14649>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list