Changeset 31184
- Timestamp:
- 01/15/2015 11:09:07 PM (10 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfifteen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfifteen/functions.php
r31182 r31184 195 195 196 196 /** 197 * JavaScript Detection. 198 * 199 * Adds a `js` class to the root `<html>` element when JavaScript is detected. 200 * 201 * @since Twenty Fifteen 1.1 202 */ 203 function twentyfifteen_javascript_detection() { 204 echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n"; 205 } 206 add_action( 'wp_head', 'twentyfifteen_javascript_detection', 0 ); 207 208 /** 197 209 * Enqueue scripts and styles. 198 210 * -
trunk/src/wp-content/themes/twentyfifteen/header.php
r30897 r31184 19 19 <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script> 20 20 <![endif]--> 21 <script>(function(){document.documentElement.className='js'})();</script>22 21 <?php wp_head(); ?> 23 22 </head>
Note: See TracChangeset
for help on using the changeset viewer.