Ticket #11373: 11373.2.diff
File 11373.2.diff, 820 bytes (added by , 14 years ago) |
---|
-
wp-includes/post.php
2908 2908 $path = '/' . $leaf_path; 2909 2909 $curpage = $page; 2910 2910 while ( $curpage->post_parent != 0 ) { 2911 $curpage = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = %d and post_type = %s", $curpage->post_parent, $post_type )); 2911 $post_parent = $curpage->post_parent; 2912 $curpage = wp_cache_get( $post_parent, 'posts' ); 2913 if ( false === $curpage ) 2914 $curpage = $wpdb->get_row( $wpdb->prepare( "SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE ID = %d and post_type = %s", $post_parent, $post_type ) ); 2912 2915 $path = '/' . $curpage->post_name . $path; 2913 2916 } 2914 2917