Respect the `fields` arg when passed to `get_children()`.
Fixes #22208. Built from https://develop.svn.wordpress.org/trunk@25160 git-svn-id: http://core.svn.wordpress.org/trunk@25139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5073ad5776
commit
8e6abf65a8
|
@ -311,9 +311,12 @@ function get_children($args = '', $output = OBJECT) {
|
|||
|
||||
$children = get_posts( $r );
|
||||
|
||||
if ( !$children )
|
||||
if ( ! $children )
|
||||
return $kids;
|
||||
|
||||
if ( ! empty( $r['fields'] ) )
|
||||
return $children;
|
||||
|
||||
update_post_cache($children);
|
||||
|
||||
foreach ( $children as $key => $child )
|
||||
|
|
Loading…
Reference in New Issue