[wp-trac] [WordPress Trac] #64234: Remove functions from block pattern class files

WordPress Trac noreply at wordpress.org
Tue Nov 11 15:03:53 UTC 2025


#64234: Remove functions from block pattern class files
------------------------------+----------------------------------------
 Reporter:  swissspidy        |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:
 Severity:  normal            |   Keywords:  needs-patch good-first-bug
  Focuses:  coding-standards  |
------------------------------+----------------------------------------
 `register_block_pattern_category` and `unregister_block_pattern_category`
 should be moved out of `src/wp-includes/class-wp-block-pattern-categories-
 registry.php` into a separate file.

 Same for `register_block_pattern` and `unregister_block_pattern` in `src
 /wp-includes/class-wp-block-patterns-registry.php`

 It's bad practice to mix class declarations with function declarations in
 the same file.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64234>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list