[wp-trac] [WordPress Trac] #63887: Add sourceURL to inline scripts and styles
WordPress Trac
noreply at wordpress.org
Wed Nov 12 11:35:14 UTC 2025
#63887: Add sourceURL to inline scripts and styles
--------------------------------------+------------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.9
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: javascript, css
--------------------------------------+------------------------------
Comment (by jonsurrell):
In [changeset:"61223" 61223]:
{{{
#!CommitTicketReference repository="" revision="61223"
Script Loader: Omit sourceURL from translation data when not printed.
The data returned from `WP_Scripts::print_translations()` when `$display`
is `false` may be used in unpredictable ways that are incompatible with
`sourceURL` comments. Omit the `sourceURL` comment in this case.
Developed in https://github.com/WordPress/wordpress-develop/pull/10505.
Follow-up to [60719].
Props jonsurrell, ralucastn, westonruter, peterwilsoncc.
See #63887.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63887#comment:64>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list