Changeset 48898 for branches/5.5
- Timestamp:
- 08/27/2020 09:59:17 PM (4 years ago)
- Location:
- branches/5.5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
-
branches/5.5/src/wp-includes/class.wp-scripts.php
r48295 r48898 310 310 } else { 311 311 $inline_script_tag = ''; 312 } 313 314 $translations = $this->print_translations( $handle, false ); 315 if ( $translations ) { 316 $translations = sprintf( "<script%s id='%s-js-translations'>\n%s\n</script>\n", $this->type_attr, esc_attr( $handle ), $translations ); 312 317 } 313 318 … … 323 328 $srce = apply_filters( 'script_loader_src', $src, $handle ); 324 329 325 if ( $this->in_default_dir( $srce ) && ( $before_handle || $after_handle ) ) {330 if ( $this->in_default_dir( $srce ) && ( $before_handle || $after_handle || $translations ) ) { 326 331 $this->do_concat = false; 327 332 … … 365 370 } 366 371 367 $translations = $this->print_translations( $handle, false );368 if ( $translations ) {369 $translations = sprintf( "<script%s id='%s-js-translations'>\n%s\n</script>\n", $this->type_attr, esc_attr( $handle ), $translations );370 }371 372 372 if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && 0 === strpos( $src, $this->content_url ) ) ) { 373 373 $src = $this->base_url . $src;
Note: See TracChangeset
for help on using the changeset viewer.