Make WordPress Core

Ticket #39493: 39493.diff

File 39493.diff, 573 bytes (added by MatheusGimenez, 8 years ago)

add body class single-{post_type_slug}-{post_name}

  • wp-includes/post-template.php

     
    617617                        $classes[] = 'single';
    618618                        if ( isset( $post->post_type ) ) {
    619619                                $classes[] = 'single-' . sanitize_html_class( $post->post_type, $post_id );
     620                                $classes[] = 'single-' . sanitize_html_class( $post->post_type, $post_id ) . '-' . sanitize_html_class( $post->post_name, $post_id );
    620621                                $classes[] = 'postid-' . $post_id;
    621622
    622623                                // Post Format