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

WordPress Trac noreply at wordpress.org
Wed Jan 31 21:34:30 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 azaozz):

 Replying to [comment:2 gziolo]:
 > I don't see any reason why it would get executed independently from
 WordPress core

 Thanks for confirming! Yep, that's what I thought too, this seems like
 something left over from long ago. What made me doubt it a bit is that the
 file name is `index.php` which generally means it is intended for loafing
 directly in the browser (default behaviour for all web servers afaik).

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

 Yea, thinking it can use `BLOCKS_PATH` especially after defining it is
 moved to default-constants.php. Thinking that's the best place for it.
 Then it would make more sense to use this constant everywhere imho.

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


More information about the wp-trac mailing list