Skip to content

Commit 2fe30e7

Browse files
committed
Script Loader: Revert sourceURL addition.
It was discovered that these changes cause some issues in the customizer when `SCRIPT_DEBUG` is `false`. Reverts [60685] and [60686]. Developed in #9671 Props jonsurrell, wildworks, tyxla. See #63887. git-svn-id: https://develop.svn.wordpress.org/trunk@60690 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1192b6b commit 2fe30e7

File tree

6 files changed

+52
-171
lines changed

6 files changed

+52
-171
lines changed

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,6 @@ public function print_extra_script( $handle, $display = true ) {
222222
return;
223223
}
224224

225-
$output .= sprintf(
226-
"\n//# sourceURL=%s",
227-
rawurlencode( "{$handle}-js-extra" )
228-
);
229-
230225
if ( ! $display ) {
231226
return $output;
232227
}
@@ -526,11 +521,6 @@ public function get_inline_script_data( $handle, $position = 'after' ) {
526521
return '';
527522
}
528523

529-
$data[] = sprintf(
530-
'//# sourceURL=%s',
531-
rawurlencode( "{$handle}-js-{$position}" )
532-
);
533-
534524
return trim( implode( "\n", $data ), "\n" );
535525
}
536526

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,11 +337,6 @@ public function print_inline_style( $handle, $display = true ) {
337337
return false;
338338
}
339339

340-
$output[] = sprintf(
341-
'/*# sourceURL=%s */',
342-
rawurlencode( "{$handle}-inline-css" )
343-
);
344-
345340
$output = implode( "\n", $output );
346341

347342
if ( ! $display ) {

tests/phpunit/tests/blocks/editor.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,6 @@ public function test_ensure_preload_data_script_tag_closes() {
762762
<script src="{$baseurl}/wp-includes/js/dist/api-fetch.min.js?ver=test" id="wp-api-fetch-js"></script>
763763
<script id="wp-api-fetch-js-after">
764764
wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( {"/test/v0/test-62797":{"body":["Unclosed comment and a script open tag \\u003C!--\\u003Cscript\\u003E"],"headers":{"Allow":"GET"}}} ) );
765-
//# sourceURL=wp-api-fetch-js-after
766765
</script>
767766
768767
HTML;

0 commit comments

Comments
 (0)