[wp-trac] [WordPress Trac] #63212: Enhancement: Do not throw PHP notice when file is not a pattern registration file

WordPress Trac noreply at wordpress.org
Fri Apr 4 08:10:58 UTC 2025


#63212: Enhancement: Do not throw PHP notice when file is not a pattern
registration file
--------------------------+------------------------
 Reporter:  webmandesign  |       Owner:  joemcgill
     Type:  enhancement   |      Status:  reviewing
 Priority:  normal        |   Milestone:  6.8
Component:  Themes        |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------

Comment (by tremidkhar):

 I agree that pattern registration should be flexible, and the filter-out
 approach seems logical. This allows developers to exclude non-pattern
 files from the patterns directory as needed.

 However, I believe the core function should throw an error if a pattern
 file is missing the required `slug` metadata. If a developer wants to
 suppress the error, they can simply filter out the file using the
 available filter.

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


More information about the wp-trac mailing list