add `hide_empty` on support like query #318

This commit is contained in:
vnmedeiros 2019-10-22 00:02:39 -03:00
parent 99483cfafe
commit c269d64c6c
1 changed files with 2 additions and 0 deletions

View File

@ -165,6 +165,7 @@ class REST_Controller extends \WP_REST_Controller {
$terms = get_terms([
'taxonomy' => $tax_query['taxonomy'],
'fields' => 'ids',
'hide_empty' => false,
'search' => $tax_query['terms']
]);
@ -179,6 +180,7 @@ class REST_Controller extends \WP_REST_Controller {
$terms = get_terms([
'taxonomy' => $tax_query['taxonomy'],
'fields' => 'ids',
'hide_empty' => false,
'search' => $tax_query['terms']
]);
if ($terms) {