Changeset 46164 for trunk/src/wp-includes/script-loader.php
- Timestamp:
- 09/18/2019 02:49:30 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r46157 r46164 2466 2466 } 2467 2467 2468 $concat = trim( $wp_scripts->concat, ', ' ); 2468 $concat = trim( $wp_scripts->concat, ', ' ); 2469 $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : " type='text/javascript'"; 2469 2470 2470 2471 if ( $concat ) { 2471 2472 if ( ! empty( $wp_scripts->print_code ) ) { 2472 echo "\n<script type='text/javascript'>\n";2473 echo "\n<script{$type_attr}>\n"; 2473 2474 echo "/* <![CDATA[ */\n"; // not needed in HTML 5 2474 2475 echo $wp_scripts->print_code; … … 2485 2486 2486 2487 $src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}" . $concatenated . '&ver=' . $wp_scripts->default_version; 2487 echo "<script type='text/javascript'src='" . esc_attr( $src ) . "'></script>\n";2488 echo "<script{$type_attr} src='" . esc_attr( $src ) . "'></script>\n"; 2488 2489 } 2489 2490 … … 2647 2648 } 2648 2649 2649 $concat = trim( $wp_styles->concat, ', ' ); 2650 $concat = trim( $wp_styles->concat, ', ' ); 2651 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 2650 2652 2651 2653 if ( $concat ) { … … 2661 2663 2662 2664 $href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&dir={$dir}" . $concatenated . '&ver=' . $ver; 2663 echo "<link rel='stylesheet' href='" . esc_attr( $href ) . "' type='text/css'media='all' />\n";2665 echo "<link rel='stylesheet' href='" . esc_attr( $href ) . "'{$type_attr} media='all' />\n"; 2664 2666 2665 2667 if ( ! empty( $wp_styles->print_code ) ) { 2666 echo "<style type='text/css'>\n";2668 echo "<style{$type_attr}>\n"; 2667 2669 echo $wp_styles->print_code; 2668 2670 echo "\n</style>\n";
Note: See TracChangeset
for help on using the changeset viewer.