Make WordPress Core

Ticket #18118: 18118.patch

File 18118.patch, 800 bytes (added by SergeyBiryukov, 13 years ago)
  • wp-includes/post-template.php

     
    430430                $classes[] = 'single';
    431431                $classes[] = 'single-' . sanitize_html_class($post->post_type, $post_id);
    432432                $classes[] = 'postid-' . $post_id;
     433                $classes[] = $post->post_name;
    433434
    434435                // Post Format
    435436                $post_format = get_post_format( $post->ID );
     
    478479                $post = get_page($page_id);
    479480
    480481                $classes[] = 'page-id-' . $page_id;
     482                $classes[] = $post->post_name;
    481483
    482484                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) ) )
    483485                        $classes[] = 'page-parent';