Skip to content

Commit 1bbecc8

Browse files
committed
Add comment about sourceURL for inline scripts
1 parent 15a4b50 commit 1bbecc8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/wp-includes/class-wp-scripts.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,12 @@ public function get_inline_script_data( $handle, $position = 'after' ) {
538538
return '';
539539
}
540540

541+
/*
542+
* Print sourceURL comment regardless of concatenation.
543+
*
544+
* Inline scripts prevent scripts from being concatenated, so
545+
* sourceURL comments are safe to print for inline scripts.
546+
*/
541547
$data[] = sprintf(
542548
'//# sourceURL=%s',
543549
rawurlencode( "{$handle}-js-{$position}" )

0 commit comments

Comments
 (0)