Make WordPress Core


Ignore:
Timestamp:
01/05/2026 04:02:03 PM (8 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.