Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #59000, comment 17


Ignore:
Timestamp:
08/29/2023 06:27:47 AM (11 months ago)
Author:
okat
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59000, comment 17

    initial v1  
    88>There seem to be couple alternatives to fix the particular case with theme-previews.php. Perhaps instead of moving the file it would be better to move the code that is adding the actions and filters to a function, and then load that function on plugins_loaded (add the hook for it in default_filters.php)? Then the file would not need moving and there will be no "loose code" in the global scope there.
    99
    10 For the issue this time, I took this approach by encapsulating hooks into a function and initializing it in `default_filters.php`. I submitted another PR, so I would greatly appreciate it if you retake a look at the PR. Thank you in advance! https://github.com/WordPress/wordpress-develop/pull/5107
     10For the issue this time, I took the approach by encapsulating hooks into a function and initializing it in `default_filters.php`. I submitted another PR, so I would greatly appreciate it if you retake a look at the PR. Thank you in advance! https://github.com/WordPress/wordpress-develop/pull/5107