public function init() { $this->setLabel(__('Title', 'buggypress')); $title = 0; if (isset($this->_issue)) { $title = $this->_issue->get_title(); } $this->setValue($title); $this->setRequired(TRUE); }
/** * @param string $field * @return mixed */ private function get_old_value($field) { switch ($field) { case 'title': return $this->issue->get_title(); case 'description': return $this->issue->get_description(); case 'project': return $this->issue->get_project_id(); case 'assignee': return $this->issue->get_assignee_id(); case 'type': return $this->issue->get_type(); case 'status': return $this->issue->get_status(); case 'resolution': return $this->issue->get_resolution(); case 'priority': return $this->issue->get_priority(); default: return apply_filters('buggypress_issue_old_value', '', $field); } }