Changeset 36112
- Timestamp:
- 12/28/2015 05:20:07 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-template.php
r35920 r36112 579 579 if ( is_404() ) 580 580 $classes[] = 'error404'; 581 if ( is_singular() ) { 582 $classes[] = 'singular'; 583 } 581 584 582 585 if ( is_single() ) { -
trunk/tests/phpunit/tests/post/getBodyClass.php
r35242 r36112 79 79 } 80 80 81 /** 82 * @ticket 35164 83 */ 84 public function test_singular_body_classes() { 85 $post_id = self::factory()->post->create(); 86 $this->go_to( get_permalink( $post_id ) ); 87 88 $class = get_body_class(); 89 $this->assertContains( "single-post", $class ); 90 $this->assertContains( "postid-{$post_id}", $class ); 91 $this->assertContains( "single-format-standard", $class ); 92 $this->assertContains( "singular", $class ); 93 94 } 95 81 96 }
Note: See TracChangeset
for help on using the changeset viewer.