Pārlūkot izejas kodu

:bug: include empty in taxonomy term array

tags/0.9.0
J 4 gadus atpakaļ
vecāks
revīzija
c035af2dda

+ 1
- 1
plugins/cia-endpoints/includes/class.make-sortby.php Parādīt failu

@@ -39,7 +39,7 @@ class Make_Sort_By extends WP_REST_Controller {
39 39
     function make_terms_array($taxonomy, $field) {
40 40
         $terms = get_terms([
41 41
             'taxonomy'   => $taxonomy,
42
-            'hide_empty' => true,
42
+            'hide_empty' => false,
43 43
             'fields'     => $field
44 44
         ]);
45 45
         return $terms;

+ 3
- 14
plugins/cia-post-types/includes/p2p-mappings.php Parādīt failu

@@ -18,21 +18,10 @@ function register_connections_for($type, $from_types) {
18 18
         ]);
19 19
     }
20 20
 }
21
+
21 22
 function register_all_one_offs() {
22
-    p2p_register_connection_type([
23
-        'name' => 'artists_to_artists',
24
-        'to' => 'artist',
25
-        'from' => 'artist',
26
-        'reciprocal' => true,
27
-        'admin_box' => $admin_box
28
-    ]);
29
-    p2p_register_connection_type([
30
-        'name' => 'shorts_to_techniques',
31
-        'to' => 'short',
32
-        'from' => 'technique',
33
-        'reciprocal' => true,
34
-        'admin_box' => $admin_box
35
-    ]);
23
+    register_connections_for('artist', ['artist']);
24
+    register_connections_for('short', ['technique']);
36 25
 }
37 26
 
38 27
 function all_connection_types() {

Notiek ielāde…
Atcelt
Saglabāt