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

WordPress Trac noreply at wordpress.org
Tue Nov 18 10:11:06 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 dev-        |     Focuses:
  reviewed                                       |  javascript, css
-------------------------------------------------+-------------------------

Comment (by jonsurrell):

 In [changeset:"61260" 61260]:
 {{{
 #!CommitTicketReference repository="" revision="61260"
 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].

 Reviewed by westonruter.
 Merges [61223] to the 6.9 branch.

 Props jonsurrell, ralucastn, westonruter, peterwilsoncc.
 See #63887.
 }}}

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


More information about the wp-trac mailing list