if ( is_taxonomy_hierarchical( $query['taxonomy'
] ) &&
$query['include_children'
] ) { $this->
transform_query( $query, 'term_id'
);
if ( is_wp_error( $query ) ) { return;
} $children = array
();
foreach ( $query['terms'
] as $term ) { $children =
array_merge( $children,
get_term_children( $term,
$query['taxonomy'
] ) );
$children[] =
$term;
} $query['terms'
] =
$children;
} $this->
transform_query( $query, 'term_taxonomy_id'
);
} /**
* Transforms a single query, from one field to another.
*
* Operates on the `$query` object by reference. In the case of error,
* `$query` is converted to a WP_Error object.
*
* @since 3.2.0
*
* @param array $query The single query. Passed by reference.
* @param string $resulting_field The resulting field. Accepts 'slug', 'name', 'term_taxonomy_id',
* or 'term_id'. Default 'term_id'.
*/