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

WordPress Trac noreply at wordpress.org
Mon Nov 24 07:40:10 UTC 2025


#64234: Remove functions from block pattern class files
----------------------------------------+-------------------------------
 Reporter:  swissspidy                  |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  7.0
Component:  General                     |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  coding-standards
----------------------------------------+-------------------------------
Changes (by dhiraj0901):

 * Attachment "64234-move-functions.patch" added.

 I’m attaching a patch for Trac #64234: 64234-move-functions.patch.
 Summary:  Moved register_block_pattern_category() /
 unregister_block_pattern_category() into src/wp-includes/block-pattern-
 categories-functions.php.  Moved register_block_pattern() /
 unregister_block_pattern() into src/wp-includes/block-patterns-
 functions.php.  Removed the free function declarations from class-wp-
 block-pattern-categories-registry.php and class-wp-block-patterns-
 registry.php and added require_once to maintain backward compatibility.
 Tests performed:  Committed local changes and created this patch.  (Note:
 PHP CLI is not installed on my environment so I could not run php -l
 locally — happy to run additional checks if requested.)  Local smoke
 testing (editor inserter and registration/unregistration) was performed
 and no issues observed.  Please review and let me know if you prefer the
 require_once inclusion to be placed in a different loader file. Happy to
 update. — Dhiraj Joshi (dhiraj0901)

-- 
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