[wp-trac] [WordPress Trac] #42804: type is not required in HTML5

WordPress Trac noreply at wordpress.org
Tue Dec 5 12:51:57 UTC 2017


#42804: type is not required in HTML5
---------------------------------------+------------------------------
 Reporter:  sasiddiqui                 |       Owner:
     Type:  enhancement                |      Status:  new
 Priority:  low                        |   Milestone:  Awaiting Review
Component:  Script Loader              |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  needs-testing needs-patch  |     Focuses:
---------------------------------------+------------------------------
Changes (by swissspidy):

 * keywords:  has-patch needs-testing => needs-testing needs-patch


Comment:

 > Patch has been attached. Let me know if i have done any mistake in it.

 Much better, but the patch should only change the lines in question. Right
 now, it changes lots of the coding style throughout the files and the
 patch is very long and difficult to scan because of this. It's recommended
 not to touch irrelevant code sections.

 For now and updated code you can use PHP Code Sniffer with the WP Coding
 Standards (https://github.com/WordPress-Coding-Standards/WordPress-Coding-
 Standards) to automatically correct coding standards mistakes. The
 WordPress Git repository contains a phpcs.xml.dist file to automatically
 configure PHPCS for that.

 > But, if you guys think that we still need to support the HTML 4 so, we
 can also add the filter for HTML 4 which doesn't remove the type attr from
 the script and style tags.

 That's what I meant with `add_theme_support`. There's precedence for that.
 See
 https://developer.wordpress.org/reference/functions/add_theme_support/#html5

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42804#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list