Exemplo n.º 1
0
 private static function register_taxonomies()
 {
     // TODO: show in menu, but not in meta box
     self::$tax_priority = new Flightless_Taxonomy('issue_priority');
     self::$tax_priority->post_types[] = self::POST_TYPE;
     self::$tax_priority->set_label(__('Priority', 'buggypress'), __('Priorities', 'buggypress'));
     self::$tax_priority->public = TRUE;
     self::$tax_priority->query_var = TRUE;
     self::$tax_priority->slug = _x('priority', 'taxonomy slug', 'buggypress');
     self::$tax_priority->set_default_terms(array('critical' => array('name' => 'Critical', 'description' => 'Must be fixed ASAP'), 'high' => array('name' => 'High', 'description' => 'High priority'), 'medium' => array('name' => 'Medium', 'description' => 'Medium priority'), 'low' => array('name' => 'Low', 'description' => 'Low priority')));
     new BuggyPress_TaxonomyOrder(self::$tax_priority->get_id());
     self::$tax_resolution = new Flightless_Taxonomy('issue_resolution');
     self::$tax_resolution->post_types[] = self::POST_TYPE;
     self::$tax_resolution->set_label(__('Resolution', 'buggypress'), __('Resolutions', 'buggypress'));
     self::$tax_resolution->public = TRUE;
     self::$tax_resolution->query_var = TRUE;
     self::$tax_resolution->slug = _x('resolution', 'taxonomy slug', 'buggypress');
     self::$tax_resolution->set_default_terms(array('unresolved' => array('name' => 'Unresolved', 'description' => 'Not yet resolved'), 'fixed' => array('name' => 'Fixed', 'description' => 'All necessary action has been taken'), 'wont-fix' => array('name' => 'Will Not Fix', 'description' => 'A decision has been made to leave it as-is'), 'duplicate' => array('name' => 'Duplicate', 'description' => 'This duplicates another issue'), 'cant-reproduce' => array('name' => 'Cannot Reproduce', 'description' => 'The problem cannot be reproduced')));
     new BuggyPress_TaxonomyOrder(self::$tax_resolution->get_id());
     self::$tax_status = new Flightless_Taxonomy('issue_status');
     self::$tax_status->post_types[] = self::POST_TYPE;
     self::$tax_status->set_label(__('Status', 'buggypress'), __('Statuses', 'buggypress'));
     self::$tax_status->public = TRUE;
     self::$tax_status->query_var = TRUE;
     self::$tax_status->slug = _x('status', 'taxonomy slug', 'buggypress');
     self::$tax_status->set_default_terms(array('open' => array('name' => 'Open', 'description' => 'Not yet complete'), 'resolved' => array('name' => 'Resolved', 'description' => 'Completed, but not yet verified'), 'closed' => array('name' => 'Closed', 'description' => 'Completed and verified'), 'deferred' => array('name' => 'Deferred', 'description' => 'Action may be taken in the future')));
     new BuggyPress_TaxonomyOrder(self::$tax_status->get_id());
     self::$tax_type = new Flightless_Taxonomy('issue_type');
     self::$tax_type->post_types[] = self::POST_TYPE;
     self::$tax_type->set_label(__('Type', 'buggypress'), __('Types', 'buggypress'));
     self::$tax_type->public = TRUE;
     self::$tax_type->query_var = TRUE;
     self::$tax_type->slug = _x('type', 'taxonomy slug', 'buggypress');
     self::$tax_type->set_default_terms(array('bug' => array('name' => 'Bug', 'description' => 'A bug that needs to be fixed'), 'feature' => array('name' => 'Feature', 'description' => 'A new feature to add'), 'task' => array('name' => 'Task', 'description' => 'A general task to complete')));
     new BuggyPress_TaxonomyOrder(self::$tax_type->get_id());
 }