1 <?php
2
3 /*
4 * WORDSMITH ACTION 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;
11
12 class Taxonomy {
13
14 protected $name;
15 protected $post_type;
16 protected $args;
17 protected $labels;
18
19 public function __construct() {
20 add_action( 'init', array( $this, 'create' ), 0 );
21 }
22
23 function create() {
24 $this->args['labels'] = $this->labels;
25 register_taxonomy( $this->name, $this->post_type, $this->args );
26 }
27
28 }
29