Make WordPress Core

Changes between Version 5 and Version 6 of Ticket #59000, comment 13


Ignore:
Timestamp:
08/25/2023 10:33:45 PM (3 years ago)
Author:
azaozz

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #59000, comment 13

    v5 v6  
    22
    33Also there is some [https://core.trac.wordpress.org/browser/tags/6.3/src/wp-includes/theme-previews.php#L78 "loose" code in theme-previews.php] that should probably not be there. Adding of actions and filters should be in `default-filters.php` unless there is a need for a (well documented) exception.
    4 
    5 In this particular case it seems it may be better to add the actions and filters from a function that runs on the `plugins_loaded` action? That would ensure they run when appropriate, and there will be no "loose" code where it doesn't belong :)