|
|
@@ -71,6 +71,17 @@ foreach ($custom_types as $type):
|
|
71
|
71
|
add_action( 'init', [ $custom_type_instance, 'register_post_type' ], 10 );
|
|
72
|
72
|
endforeach;
|
|
73
|
73
|
|
|
|
74
|
+/**
|
|
|
75
|
+ * Create taxonomies
|
|
|
76
|
+ */
|
|
|
77
|
+
|
|
|
78
|
+add_action('init', 'create_materials_taxonomy');
|
|
|
79
|
+function create_materials_taxonomy() {
|
|
|
80
|
+ $post_types_that_show_materials = [ 'artist' ];
|
|
|
81
|
+ register_taxonomy('material', $post_types_that_show_materials, [ "label" => "Materials"]);
|
|
|
82
|
+}
|
|
|
83
|
+/* Plugin Logic -- END * /
|
|
|
84
|
+
|
|
74
|
85
|
/**
|
|
75
|
86
|
* Custom Fields
|
|
76
|
87
|
* Defining our HERO, and Name override fields
|
|
|
@@ -150,13 +161,4 @@ function cmb2_artist_sort_metaboxes() {
|
|
150
|
161
|
'id' => 'artist-sort-name',
|
|
151
|
162
|
'type' => 'text'
|
|
152
|
163
|
) );
|
|
153
|
|
-}
|
|
154
|
|
-
|
|
155
|
|
-/**
|
|
156
|
|
- * Create taxonomies
|
|
157
|
|
- */
|
|
158
|
|
-add_action('init', 'create_materials_taxonomy');
|
|
159
|
|
-function create_materials_taxonomy() {
|
|
160
|
|
- $post_types_that_show_materials = [ 'artist' ];
|
|
161
|
|
- register_taxonomy("material", $post_types_that_show_materials, [ "label" => "Materials"]);
|
|
162
|
|
-}
|
|
|
164
|
+}
|