/** * Set Custom Post Type class handler * * @param string|PostTypeAbstract $post_type * * @return $this * @access public */ public function setPostType($post_type) { if ($post_type instanceof PostTypeAbstract) { $this->post_type = $post_type; $name = $this->post_type->getName(); if ($this->post_type->isMetaBoxRegistered()) { $this->setMetaBox($this->post_type->getMetaBox()); } } else { $name = $post_type; } $this->set('post_type', $name); return $this; }