1 <?php
2
3 /*
4 * WORDSMITH NON HEIRACHICAL TAXONOMY CLASS
5 *
6 * this class is the base object for a custom action to be added into wordpress.
7 * it is a best prectise initiative that all actions to implement custom wordpress logic be enclosed in a single class which exnteds this class.
8 */
9
10 namespace nk2580\wordsmith\Taxonomies\NonHierarchical;
11
12 use nk2580\wordsmith\Taxonomies\Taxonomy as Taxonomy;
13
14 class NonHierarchicalTaxonomy extends Taxonomy {
15
16 protected $name;
17 protected $post_type;
18 protected $args;
19 protected $labels;
20
21 function create() {
22 $this->args['labels'] = $this->labels;
23 $this->args['hierarchical'] = false;
24 register_taxonomy( $this->name, $this->post_type, $this->args );
25 }
26
27 }
28