Пример #1
0
 public function content($instance)
 {
     $instance = array_merge($this->defaults, (array) $instance);
     $terms_defaults = array();
     if (is_tax($instance['taxonomy']) && true == $instance['archive_responsive']) {
         $terms_defaults['child_of'] = get_queried_object_id();
     }
     echo appthemes_categories_list($instance, $terms_defaults);
 }
Пример #2
0
/**
 * Returns categories list.
 *
 * @param string $location (optional)
 *
 * @return string
 */
function cp_create_categories_list($location = 'menu')
{
    global $cp_options;
    $prefix = 'cat_' . $location . '_';
    $args['menu_cols'] = $location == 'menu' ? 3 : $cp_options->{$prefix . 'cols'};
    $args['menu_depth'] = $cp_options->{$prefix . 'depth'};
    $args['menu_sub_num'] = $cp_options->{$prefix . 'sub_num'};
    $args['cat_parent_count'] = $cp_options->{$prefix . 'count'};
    $args['cat_child_count'] = $cp_options->{$prefix . 'count'};
    $args['cat_hide_empty'] = $cp_options->{$prefix . 'hide_empty'};
    $args['cat_nocatstext'] = true;
    $args['cat_order'] = 'ASC';
    $args['taxonomy'] = APP_TAX_CAT;
    return appthemes_categories_list($args);
}