Make WordPress Core


Ignore:
Timestamp:
12/26/2025 01:14:22 PM (4 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/src/wp-includes/theme-compat/header.php

    r54881 r61411  
    2424<title><?php echo wp_get_document_title(); ?></title>
    2525
    26 <link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />
     26<link rel="stylesheet" href="<?php bloginfo( 'stylesheet_url' ); ?>" media="screen" />
    2727<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    2828
    2929<?php if ( file_exists( get_stylesheet_directory() . '/images/kubrickbgwide.jpg' ) ) { ?>
    30 <style type="text/css" media="screen">
     30<style media="screen">
    3131
    3232    <?php
Note: See TracChangeset for help on using the changeset viewer.