function __construct($type, $name, $info = array()) { if (strlen($type) > 20) { throw new \Exception('CPT type names have a max lenght of 20 chars'); } parent::__construct($type, $name, $info); $this->setup_post_type(); }
function __construct($type, $name, $object_type = null, $info = array()) { parent::__construct($type, $name, $info); $this->object_type = $object_type; $this->register_taxonomy(); }