Changeset 11053
- Timestamp:
- 04/22/2009 05:45:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-template.php
r11013 r11053 363 363 */ 364 364 function get_body_class( $class = '' ) { 365 global $wp_query, $ current_user;365 global $wp_query, $wpdb, $current_user; 366 366 367 367 $classes = array(); … … 420 420 421 421 $pageID = $wp_query->post->ID; 422 $page_children = wp_list_pages("child_of=$pageID&echo=0"); 423 424 if ( $page_children ) 422 if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) ) 425 423 $classes[] = 'page-parent'; 426 424
Note: See TracChangeset
for help on using the changeset viewer.