Make WordPress Core

Ticket #30770: 30770.4.diff

File 30770.4.diff, 1.3 KB (added by valendesigns, 11 years ago)
  • src/wp-content/themes/twentyfifteen/functions.php

    diff --git src/wp-content/themes/twentyfifteen/functions.php src/wp-content/themes/twentyfifteen/functions.php
    index 2c4b59f..7b5e217 100644
    function twentyfifteen_fonts_url() { 
    194194endif;
    195195
    196196/**
     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 */
     203function twentyfifteen_javascript_detection() {
     204        echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
     205}
     206add_action( 'wp_head', 'twentyfifteen_javascript_detection', 0 );
     207
     208/**
    197209 * Enqueue scripts and styles.
    198210 *
    199211 * @since Twenty Fifteen 1.0
  • src/wp-content/themes/twentyfifteen/header.php

    diff --git src/wp-content/themes/twentyfifteen/header.php src/wp-content/themes/twentyfifteen/header.php
    index d8e387f..e415915 100644
     
    1818        <!--[if lt IE 9]>
    1919        <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/html5.js"></script>
    2020        <![endif]-->
    21         <script>(function(){document.documentElement.className='js'})();</script>
    2221        <?php wp_head(); ?>
    2322</head>
    2423