Themes: Revert [36112]
Adding the `singular` class per default to the list of body classes is breaking the layout of Twenty Eleven and other themes. Twenty Eleven adds the `.singular` class only to single pages if the page doesn't use specific page templates. Props flixos90, swissspidy. Fixes #36510. git-svn-id: https://develop.svn.wordpress.org/trunk@37249 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5ecf38977e
commit
4bd7394a2e
@ -582,9 +582,6 @@ 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();
|
||||
|
@ -80,6 +80,7 @@ class Tests_Post_GetBodyClass extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @ticket 35164
|
||||
* @ticket 36510
|
||||
*/
|
||||
public function test_singular_body_classes() {
|
||||
$post_id = self::factory()->post->create();
|
||||
@ -89,8 +90,6 @@ class Tests_Post_GetBodyClass extends WP_UnitTestCase {
|
||||
$this->assertContains( "single-post", $class );
|
||||
$this->assertContains( "postid-{$post_id}", $class );
|
||||
$this->assertContains( "single-format-standard", $class );
|
||||
$this->assertContains( "singular", $class );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user