Make WordPress Core

Changeset 61440


Ignore:
Timestamp:
01/05/2026 04:02:03 PM (3 months ago)
Author:
jonsurrell
Message:

Scripts: Remove default attributes from tags.

SCRIPT, STYLE, and stylesheet LINK tags do not require a type attribute since the HTML5 standard was released in 2008. Removing the type attribute simplifies logic and normalizes the produced HTML content.

Developed in https://github.com/WordPress/wordpress-develop/pull/10664.

Follow-up to [61411], [46164].

Props jonsurrell, sabernhardt, westonruter.
Fixes #64428. See #59883, #64442.

Location:
trunk/src
Files:
42 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/readme.html

    r60437 r61440  
    66    <meta name="robots" content="noindex,nofollow" />
    77    <title>WordPress &#8250; ReadMe</title>
    8     <link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" type="text/css" />
     8    <link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" />
    99</head>
    1010<body>
  • trunk/src/wp-admin/admin-footer.php

    r59096 r61440  
    115115
    116116<div class="clear"></div></div><!-- wpwrap -->
    117 <script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
     117<script>if(typeof wpOnload==='function')wpOnload();</script>
    118118</body>
    119119</html>
  • trunk/src/wp-admin/admin-header.php

    r59698 r61440  
    102102$admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix );
    103103?>
    104 <script type="text/javascript">
     104<script>
    105105addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    106106var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
     
    254254?>
    255255<body class="wp-admin wp-core-ui no-js <?php echo esc_attr( $admin_body_classes ); ?>">
    256 <script type="text/javascript">
     256<script>
    257257    document.body.className = document.body.className.replace('no-js','js');
    258258</script>
  • trunk/src/wp-admin/customize.php

    r61385 r61440  
    160160<title><?php echo esc_html( $admin_title ); ?></title>
    161161
    162 <script type="text/javascript">
     162<script>
    163163var ajaxurl = <?php echo wp_json_encode( admin_url( 'admin-ajax.php', 'relative' ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>,
    164164    pagenow = 'customize';
  • trunk/src/wp-admin/edit-form-advanced.php

    r61431 r61440  
    770770
    771771<?php if ( ! wp_is_mobile() && post_type_supports( $post_type, 'title' ) && '' === $post->post_title ) : ?>
    772 <script type="text/javascript">
     772<script>
    773773try{document.post.title.focus();}catch(e){}
    774774</script>
  • trunk/src/wp-admin/edit-form-comment.php

    r59388 r61440  
    284284
    285285<?php if ( ! wp_is_mobile() ) : ?>
    286 <script type="text/javascript">
     286<script>
    287287try{document.post.name.focus();}catch(e){}
    288288</script>
  • trunk/src/wp-admin/edit-tag-form.php

    r59496 r61440  
    313313
    314314<?php if ( ! wp_is_mobile() ) : ?>
    315 <script type="text/javascript">
     315<script>
    316316try{document.forms.edittag.name.focus();}catch(e){}
    317317</script>
  • trunk/src/wp-admin/edit-tags.php

    r59727 r61440  
    690690
    691691<?php if ( ! wp_is_mobile() ) : ?>
    692 <script type="text/javascript">
     692<script>
    693693try{document.forms.addtag['tag-name'].focus();}catch(e){}
    694694</script>
  • trunk/src/wp-admin/export.php

    r58200 r61440  
    2727function export_add_js() {
    2828    ?>
    29 <script type="text/javascript">
     29<script>
    3030    jQuery( function($) {
    3131        var form = $('#export-filters'),
  • trunk/src/wp-admin/includes/class-bulk-upgrader-skin.php

    r58082 r61440  
    142142            $this->error = implode( ', ', $messages );
    143143        }
    144         echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
     144        echo '<script>jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
    145145    }
    146146
     
    173173        $this->in_loop = true;
    174174        printf( '<h2>' . $this->upgrader->strings['skin_before_update_header'] . ' <span class="spinner waiting-' . $this->upgrader->update_current . '"></span></h2>', $title, $this->upgrader->update_current, $this->upgrader->update_count );
    175         echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').css("display", "inline-block");</script>';
     175        echo '<script>jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').css("display", "inline-block");</script>';
    176176        // This progress messages div gets moved via JavaScript when clicking on "More details.".
    177177        echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr( $this->upgrader->update_current ) . '"><p>';
     
    201201            );
    202202
    203             echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js( $this->upgrader->update_current ) . '\').show();</script>';
     203            echo '<script>jQuery(\'#progress-' . esc_js( $this->upgrader->update_current ) . '\').show();</script>';
    204204        }
    205205        if ( $this->result && ! is_wp_error( $this->result ) ) {
     
    211211            }
    212212
    213             echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
     213            echo '<script>jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
    214214        }
    215215
  • trunk/src/wp-admin/includes/class-custom-image-header.php

    r60970 r61440  
    377377        }
    378378        ?>
    379 <script type="text/javascript">
     379<script>
    380380(function($){
    381381    var default_color = '<?php echo esc_js( $default_color ); ?>',
     
    432432
    433433        ?>
    434 <script type="text/javascript">
     434<script>
    435435    function onEndCrop( coords ) {
    436436        jQuery( '#x1' ).val(coords.x);
  • trunk/src/wp-admin/includes/class-wp-internal-pointers.php

    r60681 r61440  
    119119
    120120        ?>
    121         <script type="text/javascript">
     121        <script>
    122122        (function($){
    123123            var options = <?php echo wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>, setup;
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r60681 r61440  
    18721872        );
    18731873
    1874         printf( "<script type='text/javascript'>list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
     1874        printf( "<script>list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
    18751875    }
    18761876}
  • trunk/src/wp-admin/includes/class-wp-themes-list-table.php

    r60681 r61440  
    358358        }
    359359
    360         printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
     360        printf( "<script>var theme_list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
    361361        parent::_js_vars();
    362362    }
  • trunk/src/wp-admin/includes/class-wp-upgrader-skin.php

    r58082 r61440  
    246246
    247247        if ( defined( 'IFRAME_REQUEST' ) ) {
    248             echo '<script type="text/javascript">
     248            echo '<script>
    249249                    if ( window.postMessage && JSON ) {
    250250                        window.parent.postMessage(
     
    259259                </script>';
    260260        } else {
    261             echo '<script type="text/javascript">
     261            echo '<script>
    262262                    (function( wp ) {
    263263                        if ( wp && wp.updates && wp.updates.decrementCount ) {
  • trunk/src/wp-admin/includes/deprecated.php

    r60488 r61440  
    15121512function options_permalink_add_js() {
    15131513    ?>
    1514     <script type="text/javascript">
     1514    <script>
    15151515        jQuery( function() {
    15161516            jQuery('.permalink-structure input:radio').change(function() {
  • trunk/src/wp-admin/includes/media.php

    r61380 r61440  
    273273function media_send_to_editor( $html ) {
    274274    ?>
    275     <script type="text/javascript">
     275    <script>
    276276    var win = window.dialogArguments || opener || parent || top;
    277277    win.send_to_editor( <?php echo wp_json_encode( $html, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?> );
     
    551551
    552552    ?>
    553     <script type="text/javascript">
     553    <script>
    554554    addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    555555    var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
     
    613613    </head>
    614614    <body<?php echo $body_id_attr; ?> class="wp-core-ui no-js">
    615     <script type="text/javascript">
     615    <script>
    616616    document.body.className = document.body.className.replace('no-js', 'js');
    617617    </script>
     
    624624
    625625    ?>
    626     <script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
     626    <script>if(typeof wpOnload==='function')wpOnload();</script>
    627627    </body>
    628628    </html>
     
    822822    if ( isset( $_POST['insert-gallery'] ) || isset( $_POST['update-gallery'] ) ) {
    823823        ?>
    824         <script type="text/javascript">
     824        <script>
    825825        var win = window.dialogArguments || opener || parent || top;
    826826        win.tb_remove();
     
    20712071    $post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
    20722072
    2073     echo '<script type="text/javascript">post_id = ' . $post_id . ';</script>';
     2073    echo '<script>post_id = ' . $post_id . ';</script>';
    20742074
    20752075    if ( empty( $_GET['chromeless'] ) ) {
     
    22202220
    22212221    ?>
    2222     <script type="text/javascript">
     2222    <script>
    22232223    <?php
    22242224    // Verify size is an int. If not return default value.
     
    23622362    <?php media_upload_form( $errors ); ?>
    23632363
    2364     <script type="text/javascript">
     2364    <script>
    23652365    jQuery(function($){
    23662366        var preloaded = $(".media-item.preloaded");
     
    24282428    <h3 class="media-title"><?php _e( 'Insert media from another website' ); ?></h3>
    24292429
    2430     <script type="text/javascript">
     2430    <script>
    24312431    var addExtImage = {
    24322432
     
    25692569
    25702570    ?>
    2571     <script type="text/javascript">
     2571    <script>
    25722572    jQuery(function($){
    25732573        var preloaded = $(".media-item.preloaded");
     
    28972897    <?php wp_nonce_field( 'media-form' ); ?>
    28982898
    2899     <script type="text/javascript">
     2899    <script>
    29002900    jQuery(function($){
    29012901        var preloaded = $(".media-item.preloaded");
  • trunk/src/wp-admin/includes/meta-boxes.php

    r61278 r61440  
    915915        if ( ! in_array( 'commentsdiv', $hidden, true ) ) {
    916916            ?>
    917             <script type="text/javascript">jQuery(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
     917            <script>jQuery(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
    918918            <?php
    919919        }
  • trunk/src/wp-admin/includes/misc.php

    r60805 r61440  
    10811081    }
    10821082
    1083     echo '<script type="text/javascript">var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ";</script>\n";
     1083    echo '<script>var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ";</script>\n";
    10841084}
    10851085
  • trunk/src/wp-admin/includes/ms.php

    r60416 r61440  
    848848function _thickbox_path_admin_subfolder() {
    849849    ?>
    850 <script type="text/javascript">
     850<script>
    851851var tb_pathToImage = "<?php echo esc_js( includes_url( 'js/thickbox/loadingAnimation.gif', 'relative' ) ); ?>";
    852852</script>
     
    10111011function network_settings_add_js() {
    10121012    ?>
    1013 <script type="text/javascript">
     1013<script>
    10141014jQuery( function($) {
    10151015    var languageSelect = $( '#WPLANG' );
  • trunk/src/wp-admin/includes/options.php

    r60681 r61440  
    3434function options_general_add_js() {
    3535    ?>
    36 <script type="text/javascript">
     36<script>
    3737    jQuery( function($) {
    3838        var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(),
     
    113113function options_reading_add_js() {
    114114    ?>
    115 <script type="text/javascript">
     115<script>
    116116    jQuery( function($) {
    117117        var section = $('#front-static-pages'),
  • trunk/src/wp-admin/includes/post.php

    r61387 r61440  
    24612461     */
    24622462    if ( wp_script_is( 'wp-edit-post', 'done' ) ) {
    2463         printf( "<script type='text/javascript'>\n%s\n</script>\n", trim( $script ) );
     2463        printf( "<script>\n%s\n</script>\n", trim( $script ) );
    24642464    }
    24652465
  • trunk/src/wp-admin/includes/template.php

    r61412 r61440  
    21392139    wp_enqueue_style( 'colors' );
    21402140    ?>
    2141 <script type="text/javascript">
     2141<script>
    21422142addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
    21432143function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
     
    21882188    ?>
    21892189<body <?php echo $admin_body_id; ?>class="wp-admin wp-core-ui no-js iframe <?php echo esc_attr( $admin_body_classes ); ?>">
    2190 <script type="text/javascript">
     2190<script>
    21912191(function(){
    21922192var c = document.body.className;
     
    22272227    ?>
    22282228    </div>
    2229 <script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
     2229<script>if(typeof wpOnload==='function')wpOnload();</script>
    22302230</body>
    22312231</html>
     
    24962496function compression_test() {
    24972497    ?>
    2498     <script type="text/javascript">
     2498    <script>
    24992499    var compressionNonce = <?php echo wp_json_encode( wp_create_nonce( 'update_can_compress_scripts' ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>;
    25002500    var testCompression = {
  • trunk/src/wp-admin/includes/update-core.php

    r61438 r61440  
    17211721    echo '</div>';
    17221722    ?>
    1723 <script type="text/javascript">
     1723<script>
    17241724window.location = 'about.php?updated';
    17251725</script>
  • trunk/src/wp-admin/install.php

    r61356 r61440  
    471471if ( ! wp_is_mobile() ) {
    472472    ?>
    473 <script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
     473<script>var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
    474474    <?php
    475475}
     
    477477wp_print_scripts( $scripts_to_print );
    478478?>
    479 <script type="text/javascript">
     479<script>
    480480jQuery( function( $ ) {
    481481    $( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
  • trunk/src/wp-admin/media-new.php

    r60449 r61440  
    7878    <?php media_upload_form(); ?>
    7979
    80     <script type="text/javascript">
     80    <script>
    8181    var post_id = <?php echo absint( $post_id ); ?>, shortform = 3;
    8282    </script>
  • trunk/src/wp-admin/network/site-users.php

    r60976 r61440  
    237237?>
    238238
    239 <script type="text/javascript">
     239<script>
    240240var current_site_id = <?php echo absint( $id ); ?>;
    241241</script>
  • trunk/src/wp-admin/network/upgrade.php

    r60103 r61440  
    125125        echo '</ul>';
    126126        ?><p><?php _e( 'If your browser does not start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&amp;n=<?php echo ( $n + 5 ); ?>"><?php _e( 'Next Sites' ); ?></a></p>
    127         <script type="text/javascript">
     127        <script>
    128128        <!--
    129129        function nextpage() {
  • trunk/src/wp-admin/update-core.php

    r61410 r61440  
    211211        $hide_text = esc_js( __( 'Hide hidden updates' ) );
    212212        ?>
    213         <script type="text/javascript">
     213        <script>
    214214            jQuery( function( $ ) {
    215215                $( '#show-dismissed' ).on( 'click', function() {
     
    936936    ?>
    937937    </div>
    938     <script type="text/javascript">
     938    <script>
    939939    window.location = '<?php echo esc_url( self_admin_url( 'about.php?updated' ) ); ?>';
    940940    </script>
  • trunk/src/wp-admin/user-edit.php

    r60977 r61440  
    968968}
    969969?>
    970 <script type="text/javascript">
     970<script>
    971971    if (window.location.hash == '#password') {
    972972        document.getElementById('pass1').focus();
     
    974974</script>
    975975
    976 <script type="text/javascript">
     976<script>
    977977    jQuery( function( $ ) {
    978978        var languageSelect = $( '#locale' );
  • trunk/src/wp-content/themes/twentyeleven/functions.php

    r61411 r61440  
    370370    function twentyeleven_admin_header_style() {
    371371        ?>
    372     <style type="text/css" id="twentyeleven-admin-header-css">
     372    <style id="twentyeleven-admin-header-css">
    373373    .appearance_page_custom-header #headimg {
    374374        border: none;
  • trunk/src/wp-content/themes/twentyfifteen/js/customize-preview.js

    r30893 r61440  
    88
    99    if ( ! $style.length ) {
    10         $style = $( 'head' ).append( '<style type="text/css" id="twentyfifteen-color-scheme-css" />' )
     10        $style = $( 'head' ).append( '<style id="twentyfifteen-color-scheme-css" />' )
    1111                            .find( '#twentyfifteen-color-scheme-css' );
    1212    }
  • trunk/src/wp-content/themes/twentyfourteen/inc/custom-header.php

    r61411 r61440  
    104104    function twentyfourteen_admin_header_style() {
    105105        ?>
    106     <style type="text/css" id="twentyfourteen-admin-header-css">
     106    <style id="twentyfourteen-admin-header-css">
    107107    .appearance_page_custom-header #headimg {
    108108        background-color: #000;
  • trunk/src/wp-content/themes/twentysixteen/js/customize-preview.js

    r40851 r61440  
    88
    99    if ( ! style.length ) {
    10         style = $( 'head' ).append( '<style type="text/css" id="twentysixteen-color-scheme-css" />' )
     10        style = $( 'head' ).append( '<style id="twentysixteen-color-scheme-css" />' )
    1111                            .find( '#twentysixteen-color-scheme-css' );
    1212    }
  • trunk/src/wp-content/themes/twentyten/404.php

    r47122 r61440  
    2323        </div><!-- #content -->
    2424    </div><!-- #container -->
    25     <script type="text/javascript">
     25    <script>
    2626        // Focus on search field after it has loaded.
    2727        document.getElementById('s') && document.getElementById('s').focus();
  • trunk/src/wp-content/themes/twentythirteen/inc/custom-header.php

    r61411 r61440  
    155155    $header_image = get_header_image();
    156156    ?>
    157     <style type="text/css" id="twentythirteen-admin-header-css">
     157    <style id="twentythirteen-admin-header-css">
    158158    .appearance_page_custom-header #headimg {
    159159        border: none;
  • trunk/src/wp-content/themes/twentytwelve/inc/custom-header.php

    r61411 r61440  
    108108function twentytwelve_admin_header_style() {
    109109    ?>
    110     <style type="text/css" id="twentytwelve-admin-header-css">
     110    <style id="twentytwelve-admin-header-css">
    111111    .appearance_page_custom-header #headimg {
    112112        border: none;
  • trunk/src/wp-includes/class-wp-editor.php

    r60182 r61440  
    979979
    980980        ?>
    981         <script type="text/javascript">
     981        <script>
    982982        window.wp = window.wp || {};
    983983        window.wp.editor = window.wp.editor || {};
     
    15641564        wp_print_scripts( array( 'wp-tinymce' ) );
    15651565
    1566         echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
     1566        echo "<script>\n" . self::wp_mce_translation() . "</script>\n";
    15671567    }
    15681568
     
    16211621        ?>
    16221622
    1623         <script type="text/javascript">
     1623        <script>
    16241624        tinyMCEPreInit = {
    16251625            baseURL: "<?php echo $baseurl; ?>",
     
    16451645            if ( self::$ext_plugins ) {
    16461646                // Load the old-format English strings to prevent unsightly labels in old style popups.
    1647                 echo "<script type='text/javascript' src='{$baseurl}/langs/wp-langs-en.js?$version'></script>\n";
     1647                echo "<script src='{$baseurl}/langs/wp-langs-en.js?$version'></script>\n";
    16481648            }
    16491649        }
     
    16601660
    16611661        ?>
    1662         <script type="text/javascript">
     1662        <script>
    16631663        <?php
    16641664
  • trunk/src/wp-includes/class-wp-embed.php

    r60149 r61440  
    8989        }
    9090        ?>
    91 <script type="text/javascript">
     91<script>
    9292    jQuery( function($) {
    9393        $.get("<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ) . '?action=oembed-cache&post=' . $post->ID; ?>");
  • trunk/src/wp-includes/script-loader.php

    r61438 r61440  
    34893489 *
    34903490 *     // Otherwise if anything is different it warns in the JS console.
    3491  *     $js = '<script type="text/javascript">console.log( "hi" );</script>';
     3491 *     $js = '<script type="module">console.log( "hi" );</script>';
    34923492 *     'console.error( ... )' === wp_remove_surrounding_empty_script_tags( $js );
    34933493 *
  • trunk/src/wp-includes/theme-previews.php

    r60681 r61440  
    7070    $nonce_handle = 'switch-theme_' . wp_get_theme_preview_path();
    7171    ?>
    72     <script type="text/javascript">
     72    <script>
    7373        window.WP_BLOCK_THEME_ACTIVATE_NONCE = <?php echo wp_json_encode( wp_create_nonce( $nonce_handle ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>;
    7474    </script>
  • trunk/src/wp-includes/theme.php

    r61418 r61440  
    18941894    }
    18951895
    1896     $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
    1897 
    18981896    if ( ! $background && ! $color ) {
    18991897        if ( is_customize_preview() ) {
    1900             printf( '<style%s id="custom-background-css"></style>', $type_attr );
     1898            echo '<style id="custom-background-css"></style>';
    19011899        }
    19021900        return;
     
    19521950    }
    19531951
    1954     $processor = new WP_HTML_Tag_Processor( "<style{$type_attr} id=\"custom-background-css\"></style>" );
     1952    $processor = new WP_HTML_Tag_Processor( '<style id="custom-background-css"></style>' );
    19551953    $processor->next_tag();
    19561954
     
    19731971    $processor = new WP_HTML_Tag_Processor( '<style></style>' );
    19741972    $processor->next_tag();
    1975     if ( ! current_theme_supports( 'html5', 'style' ) ) {
    1976         $processor->set_attribute( 'type', 'text/css' );
    1977     }
    19781973    $processor->set_attribute( 'id', 'wp-custom-css' );
    19791974    $processor->set_modifiable_text( "\n{$styles}\n" );
     
    30073002        $classes = array_map( 'sanitize_html_class', $classes );
    30083003        $classes = '.' . implode( ', .', $classes );
    3009 
    3010         $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
    30113004        ?>
    30123005        <!-- Custom Logo: hide header text -->
    3013         <style id="custom-logo-css"<?php echo $type_attr; ?>>
     3006        <style id="custom-logo-css">
    30143007            <?php echo $classes; ?> {
    30153008                position: absolute;
Note: See TracChangeset for help on using the changeset viewer.