Changeset 12520
- Timestamp:
- 12/23/2009 04:23:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/rewrite.php
r12271 r12520 787 787 //get pages in order of hierarchy, i.e. children after parents 788 788 $posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'")); 789 790 // If we have no pages get out quick 791 if ( !$posts ) 792 return array( array(), array() ); 793 789 794 //now reverse it, because we need parents after children for rewrite rules to work properly 790 795 $posts = array_reverse($posts, true); … … 792 797 $page_uris = array(); 793 798 $page_attachment_uris = array(); 794 795 if ( !$posts )796 return array( array(), array() );797 799 798 800 foreach ($posts as $id => $post) {
Note: See TracChangeset
for help on using the changeset viewer.