<option value="open" ><?php _e('Open', $this->name); ?> </option> <option value="closed" ><?php _e('Closed', $this->name); ?> </option> </select> </p> <?php // Support Request Section - Default From Settings $sections = get_ip_sections(); $default_section = get_ip_default_section(); $current_section = get_ip_sections_by_id($support_request->ID); if (empty($current_section)) { $current_section = $default_section; } else { $current_section = $current_section[0]->term_id; } ?> <p> <label for="ip_support_section"><?php _e('Section:', $this->name); ?> </label> <select name="ip_support_section"> <option value="">-- Select a Section --</option> <?php foreach ($sections as $section) {
/** * Return a string of the support sections for a request ID * * Functions similiarly to the_category() * * @since 1.0.0 * @param $glue * @param $request_id * @uses implode() * @return String The list of sections joined by the $glue */ function get_ip_the_sections($glue = ', ', $request_id) { $section_names = array(); $sections = get_ip_sections_by_id($request_id); foreach ($sections as $section) { $section_links[] = '<a href="' . esc_url(get_term_link($section)) . '">' . $section->name . '</a>'; } return implode($glue, $section_links); }