mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Script Loader: Introduce HTML5 support for scripts and styles.
When a theme declares HTML5 support for script and styles via `add_theme_support( 'html5', array( 'script', 'style' ) )`, the `type="text/javascript"` and `type="text/css"` attributes are omitted. These attributes are unnecessary in HTML5 and cause warnings in the W3C Markup Validation Service. Props sasiddiqui, swissspidy, knutsp, SergeyBiryukov. See #42804. git-svn-id: https://develop.svn.wordpress.org/trunk@46164 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1944,8 +1944,10 @@ function gallery_shortcode( $attr ) {
|
||||
* Otherwise, defaults to true.
|
||||
*/
|
||||
if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
|
||||
$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
|
||||
|
||||
$gallery_style = "
|
||||
<style type='text/css'>
|
||||
<style{$type_attr}>
|
||||
#{$selector} {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user