[wp-trac] [WordPress Trac] #37756: Allow inline scripts on script aliases
WordPress Trac
noreply at wordpress.org
Tue Jun 10 17:03:59 UTC 2025
#37756: Allow inline scripts on script aliases
------------------------------------------+----------------------
Reporter: pcfreak30 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Script Loader | Version: 4.5
Severity: normal | Resolution: invalid
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+----------------------
Changes (by westonruter):
* status: new => closed
* resolution: => invalid
* milestone: Future Release =>
Comment:
Inline scripts can indeed now be attached to scripts registered with a
`false` src. For
[https://github.com/WordPress/performance/blob/45d132a7d0bb7aebaab56cfffc9e61dafda08e63/plugins
/view-transitions/includes/theme.php#L348-L356 example]:
{{{#!php
<?php
wp_register_script( 'plvt-view-transitions', false, array(), null, array()
); // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.MissingVersion
wp_add_inline_script( 'plvt-view-transitions', $src_script );
wp_add_inline_script( 'plvt-view-transitions', $init_script );
wp_enqueue_script( 'plvt-view-transitions' );
}}}
So I'm closing this as invalid.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37756#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list