Ticket #18118: 18118.3.patch
File 18118.3.patch, 1.0 KB (added by , 10 years ago) |
---|
-
src/wp-includes/post-template.php
529 529 530 530 $classes[] = 'single'; 531 531 if ( isset( $post->post_type ) ) { 532 $classes[] = 'single-' . sanitize_html_class( $post->post_type, $post_id);532 $classes[] = 'single-' . sanitize_html_class( $post->post_type, $post_id ); 533 533 $classes[] = 'postid-' . $post_id; 534 $classes[] = 'post-slug-' . sanitize_html_class( $post->post_name, $post_id ); 534 535 535 536 // Post Format 536 537 if ( post_type_supports( $post->post_type, 'post-formats' ) ) { … … 593 594 $post = get_post($page_id); 594 595 595 596 $classes[] = 'page-id-' . $page_id; 597 $classes[] = 'page-slug-' . sanitize_html_class( $post->post_name, $page_id ); 596 598 597 599 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) ) ) 598 600 $classes[] = 'page-parent';