Procházet zdrojové kódy

:recycle: altering taxonomy query to check for just existence

tags/0.9.0
J před 4 roky
rodič
revize
313f85fcb3

+ 1
- 3
plugins/cia-endpoints/includes/class.make-sortby.php Zobrazit soubor

@@ -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);

Načítá se…
Zrušit
Uložit