</div> <div class="multi_options multi_by_id_page"> <?php echo $this->optigen->multi(change_option_id($multi_options['page'], 'sidebar_multi_select_page_page')); ?> </div> <div class="multi_options multi_by_id_category"> <?php echo $this->optigen->multi(change_option_id($multi_options['category'], 'sidebar_multi_select_category_category')); ?> </div> <?php $tf_taxonomies = tf_get_taxonomies(); foreach ($tf_taxonomies as $key => $name) { ?> <div class="multi_options multi_by_id_<?php echo $key; ?> "> <?php echo $this->optigen->multi(change_option_id_custom($key, $multi_options['custom_category'], 'sidebar_multi_select_' . $key . '_category')); ?> </div> <?php }
$out .= $term->name . ', '; $saved_names[$rel][$id] = $term->name; } echo rtrim($out, ' ,'); ?> </td> </tr> <?php } } ?> <?php $tf_taxonomies = apply_filters('tfuse_sidebar_taxonomies', tf_get_taxonomies()); foreach ($tf_taxonomies as $key => $name) { ?> <tr> <td> <?php $rel = $key . '+default_' . $key; ?> <a href="#" rel="<?php echo $rel; ?> " class="auto_select"><?php echo ucfirst($name); ?>
public function build_select_options() { $sidebar_cfg = $this->get->ext_config($this->_the_class_name, 'base'); $select_options = $sidebar_cfg['select_options']; $out = array(); #add inbuilt post types to select menu foreach ($select_options['post_types'] as $key => $opts) { $out[$key] = $opts; } #now add the custom post types $custom_post_types = tf_get_post_types(); if (count($custom_post_types) > 0) { $tmp_post_opts = $sidebar_cfg['select_options']['post_types']['post']; foreach ($custom_post_types as $key => $name) { if (isset($sidebar_cfg['post_types'][$key])) { $tmp = $tmp_post_opts; $tmp['default_number'] = $sidebar_cfg['post_types'][$key]; $tmp['name'] = ucfirst($name); $out[$key] = $tmp; } else { $out[$key] = $tmp_post_opts; } } } #add inbuilt categories to select menu foreach ($select_options['categories'] as $key => $opts) { $out[$key] = $opts; } #add the custom taxonomies $custom_taxonomies = tf_get_taxonomies(); if (count($custom_taxonomies) > 0) { $tmp_taxonomy_opts = $sidebar_cfg['select_options']['categories']['category']; foreach ($custom_taxonomies as $key => $name) { if (isset($sidebar_cfg['taxonomies'][$key])) { $tmp = $tmp_taxonomy_opts; $tmp['default_number'] = $sidebar_cfg['taxonomies'][$key]; $tmp['name'] = ucfirst($name); $out[$key] = $tmp; } else { $out[$key] = $tmp_taxonomy_opts; } } } #add other options to select menu foreach ($select_options['other'] as $key => $opts) { $out[$key] = $opts; } $out2 = array(); foreach ($out as $key => $val) { if (!in_array($key, $sidebar_cfg['sidebar_disabled_types'])) { $out2[$key] = $val; } } return $out2; }