Changeset 46164 for trunk/src/wp-includes/theme.php
- Timestamp:
- 09/18/2019 02:49:30 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r45926 r46164 703 703 return; 704 704 } 705 echo '<link rel="stylesheet" href="' . $stylesheet . '" type="text/css" media="screen" />'; 705 706 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 707 708 printf( 709 '<link rel="stylesheet" href="%s"%s media="screen" />', 710 $stylesheet, 711 $type_attr 712 ); 706 713 } 707 714 … … 1642 1649 if ( ! $background && ! $color ) { 1643 1650 if ( is_customize_preview() ) { 1644 echo '<style type="text/css" id="custom-background-css"></style>'; 1651 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 1652 printf( '<style%s id="custom-background-css"></style>', $type_attr ); 1645 1653 } 1646 1654 return; … … 1694 1702 1695 1703 $style .= $image . $position . $size . $repeat . $attachment; 1704 1705 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 1696 1706 } 1697 1707 ?> 1698 <style type="text/css"id="custom-background-css">1708 <style<?php echo $type_attr; ?> id="custom-background-css"> 1699 1709 body.custom-background { <?php echo trim( $style ); ?> } 1700 1710 </style> … … 1710 1720 $styles = wp_get_custom_css(); 1711 1721 if ( $styles || is_customize_preview() ) : 1722 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 1712 1723 ?> 1713 <style type="text/css"id="wp-custom-css">1724 <style<?php echo $type_attr; ?> id="wp-custom-css"> 1714 1725 <?php echo strip_tags( $styles ); // Note that esc_html() cannot be used because `div > span` is not interpreted properly. ?> 1715 1726 </style> … … 2336 2347 * 2337 2348 * @since 2.9.0 2338 * @since 3.6.0 The `html5` feature was added 2339 * @since 3.9.0 The `html5` feature now also accepts 'gallery' and 'caption' 2340 * @since 4.1.0 The `title-tag` feature was added 2341 * @since 4.5.0 The `customize-selective-refresh-widgets` feature was added 2342 * @since 4.7.0 The `starter-content` feature was added 2349 * @since 3.6.0 The `html5` feature was added. 2350 * @since 3.9.0 The `html5` feature now also accepts 'gallery' and 'caption'. 2351 * @since 4.1.0 The `title-tag` feature was added. 2352 * @since 4.5.0 The `customize-selective-refresh-widgets` feature was added. 2353 * @since 4.7.0 The `starter-content` feature was added. 2343 2354 * @since 5.0.0 The `responsive-embeds`, `align-wide`, `dark-editor-style`, `disable-custom-colors`, 2344 2355 * `disable-custom-font-sizes`, `editor-color-palette`, `editor-font-sizes`, 2345 2356 * `editor-styles`, and `wp-block-styles` features were added. 2357 * @since 5.3.0 The `html5` feature now also accepts 'script' and 'style'. 2346 2358 * 2347 2359 * @global array $_wp_theme_features … … 2636 2648 $classes = '.' . implode( ', .', $classes ); 2637 2649 2650 $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"'; 2638 2651 ?> 2639 2652 <!-- Custom Logo: hide header text --> 2640 <style id="custom-logo-css" type="text/css">2653 <style id="custom-logo-css"<?php echo $type_attr; ?>> 2641 2654 <?php echo $classes; ?> { 2642 2655 position: absolute; … … 3197 3210 $home_origin = parse_url( home_url() ); 3198 3211 $cross_domain = ( strtolower( $admin_origin['host'] ) != strtolower( $home_origin['host'] ) ); 3199 3212 $type_attr = current_theme_supports( 'html5', 'script' ) ? '' : ' type="text/javascript"'; 3200 3213 ?> 3201 3214 <!--[if lte IE 8]> 3202 <script type="text/javascript">3215 <script<?php echo $type_attr; ?>> 3203 3216 document.body.className = document.body.className.replace( /(^|\s)(no-)?customize-support(?=\s|$)/, '' ) + ' no-customize-support'; 3204 3217 </script> 3205 3218 <![endif]--> 3206 3219 <!--[if gte IE 9]><!--> 3207 <script type="text/javascript">3220 <script<?php echo $type_attr; ?>> 3208 3221 (function() { 3209 3222 var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
Note: See TracChangeset
for help on using the changeset viewer.