[wp-trac] [WordPress Trac] #25750: Regression in get_pages: hierarchical is disabled when using default arguments
WordPress Trac
noreply at wordpress.org
Mon Oct 28 19:59:21 UTC 2013
#25750: Regression in get_pages: hierarchical is disabled when using default
arguments
--------------------------+-----------------------------
Reporter: chrisbliss18 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 3.7
Severity: major | Keywords: has-patch
--------------------------+-----------------------------
With default arguments, get_pages has the following relevant arguments:
hierarchical: 1
parent: -1
child_of: 0
The 3.7 release included the following code:
{{{
if ( $parent && ! $child_of )
$hierarchical = false;
}}}
This causes the default arguments listed above to change into:
hierarchical: false
parent: -1
child_of: 0
Thus, it is impossible to enable hierarchical if parent is set to -1,
which it is by default.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25750>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list