From 76c33b7e33805a09620f51d83ea0b4cab569e23b Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 28 Dec 2015 17:21:29 +0000 Subject: [PATCH] Themes: Add `singular` to the list of body classes when viewing a single post object. Adds tests Fixes #35164 Props danielpataki, johnbillion Built from https://develop.svn.wordpress.org/trunk@36112 git-svn-id: http://core.svn.wordpress.org/trunk@36077 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 3 +++ wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index ed2ce12f0e..8a2989b9ea 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -578,6 +578,9 @@ function get_body_class( $class = '' ) { $classes[] = 'attachment'; if ( is_404() ) $classes[] = 'error404'; + if ( is_singular() ) { + $classes[] = 'singular'; + } if ( is_single() ) { $post_id = $wp_query->get_queried_object_id(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 23aac1e696..92a15fd913 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.5-alpha-36111'; +$wp_version = '4.5-alpha-36112'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.