Skip to content

Commit

Permalink
Support search_meta param in ES_Query
Browse files Browse the repository at this point in the history
  • Loading branch information
tlovett1 committed Jun 28, 2014
1 parent 0cfb101 commit 39901f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/class-ep-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ private function format_args( $args ) {
}
}

if ( ! empty( $args['search_meta'] ) ) {
foreach ( $args['search_meta'] as $key ) {
$search_fields[] = 'post_meta.' . $key;
}
}

$query = array(
'bool' => array(
'must' => array(
Expand Down

1 comment on commit 39901f8

@AaronHolbrook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using a new naming convention I think it makes more sense to follow WP_Query's meta_query name. Same with the taxonomy query search.

What do you think @tlovett1 ?

Please sign in to comment.