1 <?php
2 /*
3 * WORDSMITH POST TYPE CLASS
4 *
5 * this class is the base object for a post type to be added into wordpress.
6 *
7 */
8 namespace nk2580\wordsmith\PostTypes;
9
10 class PostType{
11
12 protected $name;
13 protected $post_type;
14 protected $args;
15 protected $labels;
16
17 public function __construct() {
18 add_action( 'init', array( $this, 'create' ));
19 }
20
21 function create() {
22 $this->args['labels'] = $this->labels;
23 register_post_type( $this->name, $this->args );
24 }
25
26 }