Changeset 46287
- Timestamp:
- 09/24/2019 02:55:56 AM (5 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class.wp-scripts.php
r46171 r46287 150 150 */ 151 151 public function init() { 152 if ( ! is_admin() && ! current_theme_supports( 'html5', 'script' ) ) { 152 if ( 153 function_exists( 'is_admin' ) && ! is_admin() 154 && 155 function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'script' ) 156 ) { 153 157 $this->type_attr = " type='text/javascript'"; 154 158 } … … 221 225 } 222 226 223 echo "<script{$this->type_attr}>\n"; // CDATA and type="text/javascript" is not needed for HTML 5. 224 echo "/* <![CDATA[ */\n"; 227 echo "<script{$this->type_attr}>\n"; 228 229 // CDATA is not needed for HTML 5. 230 if ( $this->type_attr ) { 231 echo "/* <![CDATA[ */\n"; 232 } 233 225 234 echo "$output\n"; 226 echo "/* ]]> */\n"; 235 236 if ( $this->type_attr ) { 237 echo "/* ]]> */\n"; 238 } 239 227 240 echo "</script>\n"; 228 241 -
trunk/src/wp-includes/class.wp-styles.php
r46171 r46287 118 118 */ 119 119 public function __construct() { 120 if ( ! is_admin() && ! current_theme_supports( 'html5', 'style' ) ) { 120 if ( 121 function_exists( 'is_admin' ) && ! is_admin() 122 && 123 function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'style' ) 124 ) { 121 125 $this->type_attr = " type='text/css'"; 122 126 }
Note: See TracChangeset
for help on using the changeset viewer.