[wp-trac] [WordPress Trac] #60411: Parent theme wrongly missing (till 6.5-alpha-57505)
WordPress Trac
noreply at wordpress.org
Tue Feb 20 22:26:04 UTC 2024
#60411: Parent theme wrongly missing (till 6.5-alpha-57505)
-------------------------------------+-------------------------------------
Reporter: dennysdionigi | Owner: swissspidy
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.5
Component: Themes | Version: 6.4.3
Severity: normal | Resolution:
Keywords: needs-testing 2nd- | Focuses: administration,
opinion | template
-------------------------------------+-------------------------------------
Comment (by swissspidy):
Answered this on the PR already, but there is an apparent reason:
default-filters.php is loaded before wp_script_modules() and
wp_interactivity() are loaded later in wp-settings.php, so the functions
don‘t exist yet. So doing e.g. `add_action( 'after_setup_theme', array(
wp_script_modules(), 'add_hooks' ) );` in wp-settings.php doesn‘t work
(fatal error).
FWIW there‘s plenty of precedence for adding hoojs in wp-settings.php, see
for example the wp_textdomain_registry initialization just a few lines
below.
There might be better ways to solve this, but that is probably best
discussed in its own dedicated ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60411#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list