Parcourir la source

:recycle: altering taxonomy query to check for just existence

tags/0.9.0
J il y a 4 ans
Parent
révision
313f85fcb3
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1
    3
      plugins/cia-endpoints/includes/class.make-sortby.php

+ 1
- 3
plugins/cia-endpoints/includes/class.make-sortby.php Voir le fichier

@@ -98,11 +98,9 @@ class Make_Sort_By extends WP_REST_Controller {
98 98
         $taxonomy = $this->post_type . '_type';
99 99
         if($this->post_type == 'post') $taxonomy = 'category';
100 100
 
101
-        $tax_id_array = $this->make_terms_array($taxonomy, 'ids');
102 101
         $args['tax_query'] = array([
103 102
             'taxonomy' => $taxonomy,
104
-            'field'    => 'term_id',
105
-            'terms'    => $tax_id_array,
103
+            'operator' => 'EXISTS'
106 104
         ]);
107 105
 
108 106
         $q = new WP_Query($args);

Chargement…
Annuler
Enregistrer