Don't fetch auto-draft pages in WP_Rewrite::page_uri_index(). props duck_, see #17176.
git-svn-id: https://develop.svn.wordpress.org/trunk@17929 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
02e8db225f
commit
1c3bcac7fd
@ -767,7 +767,7 @@ class WP_Rewrite {
|
||||
global $wpdb;
|
||||
|
||||
//get pages in order of hierarchy, i.e. children after parents
|
||||
$posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'"));
|
||||
$posts = get_page_hierarchy( $wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page' AND post_status != 'auto-draft'") );
|
||||
|
||||
// If we have no pages get out quick
|
||||
if ( !$posts )
|
||||
|
Loading…
Reference in New Issue
Block a user