Make WordPress Core

Ticket #18118: 18118.2.patch

File 18118.2.patch, 878 bytes (added by SergeyBiryukov, 10 years ago)
  • src/wp-includes/post-template.php

     
    531531                if ( isset( $post->post_type ) ) {
    532532                        $classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id);
    533533                        $classes[] = 'postid-' . $post_id;
     534                        $classes[] = 'post-slug-' . $post->post_name;
    534535
    535536                        // Post Format
    536537                        if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
     
    593594                $post = get_post($page_id);
    594595
    595596                $classes[] = 'page-id-' . $page_id;
     597                $classes[] = 'page-slug-' . $post->post_name;
    596598
    597599                if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' AND post_status = 'publish' LIMIT 1", $page_id) ) )
    598600                        $classes[] = 'page-parent';