Make WordPress Core


Ignore:
Timestamp:
12/26/2025 01:14:22 PM (5 months ago)
Author:
jonsurrell
Message:

Scripts: Remove default type attribute 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/10658.

Follow-up to [46164].

Props hardikhuptechdev, jonsurrell, dmsnell, westonruter.
Fixes #64428. See #59883, #64442.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/fonts/font-face/wpFontFace/generateAndPrint.php

    r61409 r61411  
    3232    public function test_should_generate_and_print_given_fonts( array $fonts, $expected ) {
    3333        $font_face       = new WP_Font_Face();
    34         $style_element   = "<style class='wp-fonts-local' type='text/css'>\n%s\n</style>\n";
     34        $style_element   = "<style class='wp-fonts-local'>\n%s\n</style>\n";
    3535        $expected_output = sprintf( $style_element, $expected );
    3636
Note: See TracChangeset for help on using the changeset viewer.