[wp-trac] [WordPress Trac] #12873: get_pages() may be run before init
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 7 06:17:17 UTC 2010
#12873: get_pages() may be run before init
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Post Types | Version: 3.0
Severity: normal | Keywords: dev-feedback
--------------------------+-------------------------------------------------
Comment(by nacin):
One option would be to change:
{{{
if ( !in_array( $post_type, $hierarchical_post_types ) )
}}}
to:
if ( 'page' != $post_type && !in_array( $post_type,
$hierarchical_post_types ) )
}}}
Same with get_post_stati() and 'publish'. Then we can leave the return
false and everything else.
Might be a few other places we need to update due to similar API changes,
but I'm not sure.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12873#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list