Ver código fonte

:sparkles: added eta fields for techniques

tags/0.9.0
J 4 anos atrás
pai
commit
8619bd0404

+ 2
- 2
plugins/cia-post-types/includes/custom-metaboxes.php Ver arquivo

39
         $cmb = new_cmb2_box([
39
         $cmb = new_cmb2_box([
40
             'id'              => 'hero_metabox',
40
             'id'              => 'hero_metabox',
41
             'title'           => __( 'Hero', 'cmb2' ),
41
             'title'           => __( 'Hero', 'cmb2' ),
42
-            'object_types'    => ['artist', 'episode', 'event', 'exhibition', 'guide', 'short', 'object', 'publication'], // Post type
42
+            'object_types'    => ['artist', 'episode', 'event', 'exhibition', 'guide', 'short', 'object', 'publication',  'technique'], // Post type
43
             'show_in_rest'    => WP_REST_Server::READABLE
43
             'show_in_rest'    => WP_REST_Server::READABLE
44
         ]);
44
         ]);
45
 
45
 
62
         $cmb = new_cmb2_box([
62
         $cmb = new_cmb2_box([
63
             'id'           => 'stick_metabox',
63
             'id'           => 'stick_metabox',
64
             'title'        => __( 'Sticky Post', 'cmb2' ),
64
             'title'        => __( 'Sticky Post', 'cmb2' ),
65
-            'object_types' => ['artist', 'episode', 'event', 'exhibition', 'guide', 'short', 'object', 'publication', 'page', 'post'], // Post type
65
+            'object_types' => ['artist', 'episode', 'event', 'exhibition', 'guide', 'short', 'object', 'publication', 'page', 'post', 'technique'], // Post type
66
             'show_in_rest' => WP_REST_Server::READABLE
66
             'show_in_rest' => WP_REST_Server::READABLE
67
         ]);
67
         ]);
68
 
68
 

+ 1
- 1
plugins/cia-post-types/includes/custom-taxonomies.php Ver arquivo

2
     function create_materials_taxonomy() {
2
     function create_materials_taxonomy() {
3
         $post_types_that_show_materials = [
3
         $post_types_that_show_materials = [
4
             'artist', 'guide', 'short',
4
             'artist', 'guide', 'short',
5
-            'object', 'publication',
5
+            'object', 'publication', 'technique'
6
         ];
6
         ];
7
         register_taxonomy('material', $post_types_that_show_materials, ['label' => 'Materials']);
7
         register_taxonomy('material', $post_types_that_show_materials, ['label' => 'Materials']);
8
     }
8
     }

+ 29
- 0
plugins/cia-post-types/includes/p2p-mappings.php Ver arquivo

42
         'reciprocal' => true,
42
         'reciprocal' => true,
43
         'admin_box' => $admin_box
43
         'admin_box' => $admin_box
44
     ]);
44
     ]);
45
+    p2p_register_connection_type([
46
+        'name' => 'artists_to_shorts',
47
+        'to' => 'artist',
48
+        'from' => 'short',
49
+        'reciprocal' => true,
50
+        'admin_box' => $admin_box
51
+    ]);
45
     p2p_register_connection_type([
52
     p2p_register_connection_type([
46
         'name' => 'artists_to_techniques',
53
         'name' => 'artists_to_techniques',
47
         'to' => 'artist',
54
         'to' => 'artist',
71
         'reciprocal' => true,
78
         'reciprocal' => true,
72
         'admin_box' => $admin_box
79
         'admin_box' => $admin_box
73
     ]);
80
     ]);
81
+    p2p_register_connection_type([
82
+        'name' => 'episodes_to_shorts',
83
+        'to' => 'episode',
84
+        'from' => 'short',
85
+        'reciprocal' => true,
86
+        'admin_box' => $admin_box
87
+    ]);
88
+    p2p_register_connection_type([
89
+        'name' => 'episodes_to_techniques',
90
+        'to' => 'episode',
91
+        'from' => 'technique',
92
+        'reciprocal' => true,
93
+        'admin_box' => $admin_box
94
+    ]);
74
 
95
 
75
     p2p_register_connection_type([
96
     p2p_register_connection_type([
76
         'name' => 'events_to_exhibitions',
97
         'name' => 'events_to_exhibitions',
94
         'reciprocal' => true,
115
         'reciprocal' => true,
95
         'admin_box' => $admin_box
116
         'admin_box' => $admin_box
96
     ]);
117
     ]);
118
+
119
+    p2p_register_connection_type([
120
+        'name' => 'shorts_to_techniques',
121
+        'to' => 'short',
122
+        'from' => 'technique',
123
+        'reciprocal' => true,
124
+        'admin_box' => $admin_box
125
+    ]);
97
 }
126
 }
98
 add_action( 'p2p_init', 'all_connection_types' );
127
 add_action( 'p2p_init', 'all_connection_types' );
99
 
128
 

Carregando…
Cancelar
Salvar