Exemplo n.º 1
0
 public static function create_post_type()
 {
     self::$cpt = new BuggyPress_Post_Type(self::POST_TYPE);
     self::$cpt->public = FALSE;
     self::$cpt->has_archive = FALSE;
     self::$cpt->show_ui = FALSE;
     self::$cpt->permalink_epmask = EP_NONE;
     self::$cpt->set_post_type_label(__('Filter', 'buggypress'), __('Filters', 'buggypress'));
     self::$cpt->slug = _x('issue_filters', 'post type slug', 'buggypress');
     self::$cpt->remove_support(array('title', 'author'));
     self::register_taxonomies();
 }
Exemplo n.º 2
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');
 }
Exemplo n.º 3
0
 public static function create_post_type()
 {
     self::$cpt = new BuggyPress_Post_Type(self::POST_TYPE);
     self::$cpt->set_post_type_label(__('Project', 'buggypress'), __('Projects', 'buggypress'));
     self::$cpt->slug = _x('projects', 'post type slug', 'buggypress');
     self::$cpt->remove_support(array('author'));
     self::$cpt->hierarchical = TRUE;
     self::register_taxonomies();
     self::register_meta_boxes();
     self::$cpt->capability_type = 'project';
     self::$cpt->map_meta_cap = TRUE;
     self::$cpt->capabilities = array('read' => 'read_projects');
     $permitter = BuggyPress_Permissions::get_instance();
     $permitter->add_permissions('projects', 'administrator');
     $permitter->add_permissions('projects', 'editor');
 }