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
This commit is contained in:
John Blackbourn 2015-12-28 17:21:29 +00:00
parent d84621cc19
commit 76c33b7e33
2 changed files with 4 additions and 1 deletions

View File

@ -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();

View File

@ -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.