Changeset 60719 for trunk/src/wp-includes/class-wp-scripts.php
- Timestamp:
- 09/08/2025 11:25:40 AM (2 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-scripts.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-scripts.php
r60704 r60719 221 221 if ( ! $output ) { 222 222 return; 223 } 224 225 /* 226 * Do not print a sourceURL comment if concatenation is enabled. 227 * 228 * Extra scripts may be concatenated into a single script. 229 * The line-based sourceURL comments may a concatenated script and 230 * do not make sense when multiple are joined together. 231 */ 232 if ( ! $this->do_concat ) { 233 $output .= sprintf( 234 "\n//# sourceURL=%s", 235 rawurlencode( "{$handle}-js-extra" ) 236 ); 223 237 } 224 238 … … 525 539 } 526 540 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 */ 547 $data[] = sprintf( 548 '//# sourceURL=%s', 549 rawurlencode( "{$handle}-js-{$position}" ) 550 ); 551 527 552 return trim( implode( "\n", $data ), "\n" ); 528 553 } … … 697 722 } 698 723 724 $source_url = rawurlencode( "{$handle}-js-translations" ); 725 699 726 $output = <<<JS 700 727 ( function( domain, translations ) { … … 703 730 wp.i18n.setLocaleData( localeData, domain ); 704 731 } )( "{$domain}", {$json_translations} ); 732 //# sourceURL={$source_url} 705 733 JS; 706 734
Note: See TracChangeset
for help on using the changeset viewer.