[wp-trac] [WordPress Trac] #54070: Increase CPT "machine name" limit from its current maximum of 20 characters.

WordPress Trac noreply at wordpress.org
Fri Sep 3 15:35:54 UTC 2021


#54070: Increase CPT "machine name" limit from its current maximum of 20
characters.
-------------------------------------------------+-------------------------
 Reporter:  taupecat                             |       Owner:  (none)
     Type:  feature request                      |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Database                             |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  needs-patch dev-feedback needs-      |     Focuses:  coding-
  codex                                          |  standards
-------------------------------------------------+-------------------------
Changes (by zodiac1978):

 * keywords:   => needs-patch dev-feedback needs-codex
 * component:  General => Database


Comment:

 I've used Git blame to look for the tickets which introduced those limits
 in the `schema.php`

 I’ve searched for the reason to limit the post type to 20 chars and found
 this comment:
 https://core.trac.wordpress.org/ticket/2604#comment:5

 It was `varchar(100)` before. See:
 https://core.trac.wordpress.org/ticket/1710

 Looks like the taxonomy part was handled here:
 https://core.trac.wordpress.org/ticket/4189

 It was first `varchar(55)` and changed in a different patch on the same
 ticket to `varchar(32)`.

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


More information about the wp-trac mailing list