Enhancement to post-indexer Network_Query()


I think that post_parent__in should be supported in your Post Indexer Network_Query() class. It makes it a lot easier to query posts this way and is a native feature of WP_Query() which you are clearly trying to make similar.

Change on line 2188 of classes/networkquery.php -

if ( is_numeric($q['post_parent']) ) {

			$where .= $wpdb->prepare( " AND $this->network_posts.post_parent = %d ", $q['post_parent'] );

		} elseif(array_key_exists('post_parent__in', $q) && count($q['post_parent__in'])) {

			foreach($q['post_parent__in'] as $key => $value) if(!is_numeric($value)) unset($q['post_parent__in'][$key]);
			$where .= sprintf('AND %s.post_parent IN (\'%s\')', $this->network_posts, implode('\',\'', $q['post_parent__in']));


Please can this be incorporated into the next release? That would really be appreciated. Also if you could possibly setup some filters for Network_Query() so its more extensible that would be good.