'geocraft_widget_categories', 'description' => __("A list or dropdown of categories for place")); parent::__construct('custom-categories', __('Geocraft Listing Categories'), $widget_ops); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Listing Categories') : $instance['title'], $instance, $this->id_base); $c = !empty($instance['count']) ? '1' : '0'; $h = !empty($instance['hierarchical']) ? '1' : '0'; $d = !empty($instance['dropdown']) ? '1' : '0'; $empty = !empty($instance['hideempty']) ? '0' : '1'; echo $before_widget; if ($title) echo $before_title . $title . $after_title; $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h, 'taxonomy' => CUSTOM_CAT_TYPE, 'hide_empty' => $empty,); if ($d) { $taxonomies = array(CUSTOM_CAT_TYPE); $args = array('orderby' => 'count', 'hide_empty' => true); echo geocraft_get_terms_dropdown($taxonomies, $args); $cat_args['show_option_none'] = __('Select Category'); ?> '')); $title = esc_attr($instance['title']); $count = isset($instance['count']) ? (bool) $instance['count'] : false; $hierarchical = isset($instance['hierarchical']) ? (bool) $instance['hierarchical'] : false; $dropdown = isset($instance['dropdown']) ? (bool) $instance['dropdown'] : false; $hideempty = isset($instance['hideempty']) ? (bool) $instance['hideempty'] : false; ?>

/>
/>
/>
/>