Make WordPress Core

Changeset 37249


Ignore:
Timestamp:
04/19/2016 09:23:20 PM (8 years ago)
Author:
ocean90
Message:

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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r36942 r37249  
    583583    if ( is_404() )
    584584        $classes[] = 'error404';
    585     if ( is_singular() ) {
    586         $classes[] = 'singular';
    587     }
    588585
    589586    if ( is_single() ) {
  • trunk/tests/phpunit/tests/post/getBodyClass.php

    r36112 r37249  
    8181    /**
    8282     * @ticket 35164
     83     * @ticket 36510
    8384     */
    8485    public function test_singular_body_classes() {
     
    9091        $this->assertContains( "postid-{$post_id}", $class );
    9192        $this->assertContains( "single-format-standard", $class );
    92         $this->assertContains( "singular", $class );
    93 
    9493    }
    9594
Note: See TracChangeset for help on using the changeset viewer.