Ver código fonte

:recycle: checking for materials in api query

tags/0.9.0
J 4 anos atrás
pai
commit
d9b8168ed7

+ 5
- 1
plugins/cia-endpoints/includes/class.make-sortby.php Ver arquivo

34
         }
34
         }
35
         
35
         
36
         if($this->post_type == 'artist') {
36
         if($this->post_type == 'artist') {
37
+            //  Default to all materials
37
             $tax_id_array = [3, 4, 5, 6, 7, 8];
38
             $tax_id_array = [3, 4, 5, 6, 7, 8];
38
-            $tax_id_array = explode( ',', $params['materials'] );
39
+
40
+            if ($params['materials']) {
41
+                $tax_id_array = explode( ',', $params['materials'] );
42
+            }
39
             // 3 clay
43
             // 3 clay
40
             // 4 fiber
44
             // 4 fiber
41
             // 5 glass
45
             // 5 glass

Carregando…
Cancelar
Salvar