function rcl_publication_termlist($tax = false) { global $group_id, $rcl_options, $options_gr, $formData; if ($tax) { $formData->taxonomy[$formData->post_type] = $tax; } if (!isset($formData->taxonomy[$formData->post_type]) && $formData->post_id) { return false; } $ctg = $formData->terms ? $formData->terms : 0; if ($formData->post_type == 'post') { $cf = rcl_get_custom_fields($formData->post_id, $formData->post_type, $formData->form_id); if (!$ctg) { $ctg = isset($cf['options']['terms']) && $cf['options']['terms'] ? $cf['options']['terms'] : $rcl_options['id_parent_category']; } $cnt = isset($rcl_options['count_category_post']) ? $rcl_options['count_category_post'] : 0; } if ($formData->post_type == 'post-group') { $options_gr = rcl_get_options_group($group_id); $catlist = rcl_get_tags_list_group($options_gr['tags'], $formData->post_id); } else { $cnt = !$cnt ? 1 : $cnt; $cat_list = $formData->post_id ? get_public_catlist() : ''; $sel = new Rcl_List_Terms(); $catlist = $sel->get_select_list(get_public_allterms(), $cat_list, $cnt, $ctg); } if (!$catlist) { return false; } echo '<label>' . __('Category', 'wp-recall') . ':</label>' . $catlist; }
function rcl_get_group_category_list() { global $rcl_group; $targs = array('number' => 0, 'hide_empty' => true, 'hierarchical' => false, 'pad_counts' => false, 'get' => '', 'child_of' => 0, 'parent' => $rcl_group->term_id); $tags = get_terms('groups', $targs); if ($tags) { return '<div class="search-form-rcl"> <form method="get"> ' . rcl_get_tags_list_group((object) $tags, '', __('Display all records', 'wp-recall')) . ' <input type="hidden" name="search-p" value="' . $rcl_group->term_id . '"> <input type="submit" class="recall-button" value="' . __('Show', 'wp-recall') . '"> </form> </div>'; } }