From 7be12f7d8de7f92fe6619d66a043fbd3f567822e Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Thu, 15 Jan 2015 23:10:22 +0000 Subject: [PATCH] Twenty Fifteen: move `js` and `no-js` class name functionality out of header template and into a `wp_head` hook in functions.php file so that the JavaScript functionality isn't hard-coded into a template file. Fixes #30770, props chipbennett, valendesigns, and peterwilsoncc. Built from https://develop.svn.wordpress.org/trunk@31184 git-svn-id: http://core.svn.wordpress.org/trunk@31165 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfifteen/functions.php | 12 ++++++++++++ wp-content/themes/twentyfifteen/header.php | 1 - wp-includes/version.php | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentyfifteen/functions.php b/wp-content/themes/twentyfifteen/functions.php index 61dfdcf446..f0d94ecc53 100644 --- a/wp-content/themes/twentyfifteen/functions.php +++ b/wp-content/themes/twentyfifteen/functions.php @@ -193,6 +193,18 @@ function twentyfifteen_fonts_url() { } endif; +/** + * JavaScript Detection. + * + * Adds a `js` class to the root `` element when JavaScript is detected. + * + * @since Twenty Fifteen 1.1 + */ +function twentyfifteen_javascript_detection() { + echo "\n"; +} +add_action( 'wp_head', 'twentyfifteen_javascript_detection', 0 ); + /** * Enqueue scripts and styles. * diff --git a/wp-content/themes/twentyfifteen/header.php b/wp-content/themes/twentyfifteen/header.php index d8e387ff7a..e415915c59 100644 --- a/wp-content/themes/twentyfifteen/header.php +++ b/wp-content/themes/twentyfifteen/header.php @@ -18,7 +18,6 @@ - diff --git a/wp-includes/version.php b/wp-includes/version.php index 6566c66f92..2c0b7fb346 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.2-alpha-31183'; +$wp_version = '4.2-alpha-31184'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.