[wp-trac] [WordPress Trac] #63887: Add sourceURL to inline scripts and styles

WordPress Trac noreply at wordpress.org
Fri Oct 10 04:17:38 UTC 2025


#63887: Add sourceURL to inline scripts and styles
--------------------------------------+------------------------------
 Reporter:  jonsurrell                |       Owner:  jonsurrell
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  6.9
Component:  Script Loader             |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  javascript, css
--------------------------------------+------------------------------
Changes (by westonruter):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60920" 60920]:
 {{{
 #!CommitTicketReference repository="" revision="60920"
 Script Loader: Use original stylesheet URL for `sourceURL` when inlined.

 For inline styles which had been inlined from registered external
 stylesheets via `wp_maybe_inline_styles()`, this defers to using the
 original stylesheet URL for the `sourceURL` as opposed to fabricating one
 from the stylesheet handle. This makes the `sourceURL` much more useful
 for debugging, as it indicates where the stylesheet is located. This
 allows a developer to make a change to the CSS more easily.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10177.

 Follow-up to [50836].

 Props westonruter, mukesh27, gziolo.
 See #50328, #52620.
 Fixes #63887.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63887#comment:56>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list