Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #60352, comment 1


Ignore:
Timestamp:
01/26/2024 12:44:21 AM (22 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #60352, comment 1

    v1 v2  
    66- Despite that `BLOCKS_PATH` is defined when `require-dynamic-blocks.php` is loaded, the constant is not used in the latter: https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/blocks/require-dynamic-blocks.php. Doesn't seem to make sense to define it and not use it?
    77
    8 - Ideally there will be no PHP code that runs in the global scope in any of the files in `/wp-includes`. This is true for nearly all of them, except for files in `/wp-includes/blocks`. Thinking these files need to be factored to follow the basic design principles of the rest of WP.
     8- Ideally there will be no PHP code that runs in the global scope in any of the files in `/wp-includes`. This is true for nearly all of them, except for files in `/wp-includes/blocks`. Thinking the code in these files need to be fixed to follow the basic design principles of the rest of WP.
    99  - If they must be "entry points" they should check if WP has been bootstrapped and bootstrap it if not.
    1010  - If they were intended only for use in other files, or only for use in the REST API, the loose/global code in them (including calls to `add_action()`, `add_filter()`, etc.) should be wrapped in conditionals ensuring these run only when appropriate.