Ver código fonte

:bug: include empty in taxonomy term array

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

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

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

+ 3
- 14
plugins/cia-post-types/includes/p2p-mappings.php Ver arquivo

18
         ]);
18
         ]);
19
     }
19
     }
20
 }
20
 }
21
+
21
 function register_all_one_offs() {
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
 function all_connection_types() {
27
 function all_connection_types() {

Carregando…
Cancelar
Salvar