[wp-trac] [WordPress Trac] #62523: Can't register Block Templates for CPTs with an underscore "_" character in the key
WordPress Trac
noreply at wordpress.org
Wed Nov 27 17:00:54 UTC 2024
#62523: Can't register Block Templates for CPTs with an underscore "_" character in
the key
-------------------------------------------------+-------------------------
Reporter: alexandrebuffet | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Editor | Version: 6.7
Severity: normal | Resolution:
Keywords: has-patch needs-testing has- | Focuses: template
testing-info |
-------------------------------------------------+-------------------------
Changes (by oglekler):
* severity: major => normal
Comment:
@noisysocks can you please look at this one?
This ticket was discussed during the Test team triage session.
According to WPCS
"Files should be named descriptively using lowercase letters. Hyphens
should separate words."
https://developer.wordpress.org/coding-standards/wordpress-coding-
standards/php/
From this, it looks like all underscores in post type names should be
filtered to hyphens, but if we don't have it yet, it can make braking
change, so, it looks like the best option is to allow underscores in the
template names.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62523#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list