WordPress.org

Make WordPress Core

Ticket #11331: body-class.patch

File body-class.patch, 660 bytes (added by garyc40, 6 years ago)
  • wp-includes/post-template.php

    Property changes on: .
    ___________________________________________________________________
    Added: svn:ignore
       + wp-config.php
    
    
     
    427427                $pageID = $wp_query->post->ID; 
    428428 
    429429                $classes[] = 'page-id-' . $pageID; 
     430                $classes[] = 'page-slug-' . $wp_query->post->post_name; 
    430431 
    431432                if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) ) 
    432433                        $classes[] = 'page-parent';