[wp-trac] [WordPress Trac] #60352: Fix the architectural design of `/wp-includes/blocks/index.php`

WordPress Trac noreply at wordpress.org
Fri Jan 26 11:51:40 UTC 2024


#60352: Fix the architectural design of `/wp-includes/blocks/index.php`
--------------------------+---------------------
 Reporter:  azaozz        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.5
Component:  General       |     Version:  5.5
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------

Comment (by gziolo):

 `/wp-includes/blocks/index.php` - this file is included as all other files
 as it registers core blocks that need to be available both in the admin
 and on the front end. I don't see any reason why it would get executed
 independently from WordPress core and it definitely was never designed for
 such purposes.

 > Despite that BLOCKS_PATH is defined when require-dynamic-blocks.php is
 loaded

 Interesting, this file is auto-generated with a script, so we could easily
 change it to use `BLOCKS_PATH` if that makes sense.

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


More information about the wp-trac mailing list