Don't fetch auto-draft pages in WP_Rewrite::page_uri_index(). props duck_, see #17176.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da2732c7de
commit
bd5090cbd6
|
@ -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