public function applyWpQuery(WP_Query $wpQuery) { $this->wp_query = $wpQuery; $this->formatArgs($wpQuery); }
/** * @param null|WP_Query $wpQuery * * @return \Wallmander\ElasticsearchIndexer\Model\Query */ function es_query($wpQuery = null) { $esq = new Query(); if ($wpQuery instanceof WP_Query) { $esq->applyWpQuery($wpQuery); } return $esq; }