Changeset 48897
- Timestamp:
- 08/27/2020 09:57:01 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class.wp-scripts.php
r48295 r48897 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.