WordPress.org

Make WordPress Core

Ticket #11609: get_post_class.diff

File get_post_class.diff, 510 bytes (added by Frumph, 8 years ago)

get_post_class diff, create the type as .post-<type>

  • .php

    old new  
    311311                return $classes;
    312312
    313313        $classes[] = 'post-' . $post->ID;
    314         $classes[] = $post->post_type;
     314       
     315        if ($post->post_type == 'post') {
     316                $classes[] = 'post';
     317        } else {
     318                $classes[] = 'post-' . $post->post_type;
     319        }
    315320
    316321        // sticky for Sticky Posts
    317322        if ( is_sticky($post->ID) && is_home())