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:
Scott Taylor 2013-08-29 15:08:12 +00:00
parent 5073ad5776
commit 8e6abf65a8
1 changed files with 4 additions and 1 deletions

View File

@ -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 )