Changeset 3558 for trunk/wp-includes/functions.php
- Timestamp:
- 02/20/2006 05:13:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r3548 r3558 676 676 $full_path .= ($pathdir!=''?'/':'') . sanitize_title($pathdir); 677 677 678 $pages = $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name = '$leaf_path' ");678 $pages = $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_name = '$leaf_path' AND post_type='page'"); 679 679 680 680 if ( empty($pages) ) … … 685 685 $curpage = $page; 686 686 while ($curpage->post_parent != 0) { 687 $curpage = $wpdb->get_row("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = '$curpage->post_parent' ");687 $curpage = $wpdb->get_row("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = '$curpage->post_parent' and post_type='page'"); 688 688 $path = '/' . $curpage->post_name . $path; 689 689 }
Note: See TracChangeset
for help on using the changeset viewer.