Esempio n. 1
0
 public static function create_post_type()
 {
     self::$cpt = new BuggyPress_Post_Type(self::POST_TYPE);
     self::$cpt->set_post_type_label(__('Issue', 'buggypress'), __('Issues', 'buggypress'));
     self::$cpt->slug = _x('issues', 'post type slug', 'buggypress');
     self::$cpt->add_support(array('comments', 'revisions'));
     self::register_taxonomies();
     self::register_meta_boxes();
     self::$cpt->capability_type = 'issue';
     self::$cpt->map_meta_cap = TRUE;
     self::$cpt->capabilities = array('read' => 'read_issues');
     $permitter = BuggyPress_Permissions::get_instance();
     $permitter->add_permissions('issues', 'administrator');
     $permitter->add_permissions('issues', 'editor');
 }