'',
'count' => $this->count,
'hierarchical' => $this->hierarchical,
'dropdown' => $this->dropdown );
if ( !empty($_POST['ace-categories-submit']) )
{
$options['title'] = trim(strip_tags(stripslashes($_POST['ace-categories-title'])));
$options['count'] = isset($_POST['ace-categories-count']);
$options['hierarchical'] = isset($_POST['ace-categories-hierarchical']);
$options['dropdown'] = isset($_POST['ace-categories-dropdown']);
update_option('ace_widget_categories', $options);
}
$title = attribute_escape( $options['title'] );
$count = (bool) $options['count'];
$hierarchical = (bool) $options['hierarchical'];
$dropdown = (bool) $options['dropdown'];
?>
'',
'count' => $this->count,
'hierarchical' => $this->hierarchical,
'dropdown' => $this->dropdown );
$c = $options['count'] ? '1' : '0';
$h = $options['hierarchical'] ? '1' : '0';
$d = $options['dropdown'] ? '1' : '0';
$cats_to_exclude = '';
$title = empty($options['title']) ? __('Categories') : apply_filters('widget_title', $options['title']);
echo $before_widget;
echo $before_title . $title . $after_title;
/* Here comes ACE patch ;) */
if (is_array($ace_targets) && get_option("ace_settings_hide"))
{
foreach ($ace_targets as $key=>$val)
{
if (!empty($wp_query->$key) && $wp_query->$key == 1) $filter = $key;
/**
* XXX: Still have to fix here
*/
}
$cats_to_exclude = get_option("ace_categories_".$filter);
}
$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h, 'exclude' => $cats_to_exclude);
if ( $d )
{
$cat_args['show_option_none'] = __('Select Category');
wp_dropdown_categories($cat_args);
?>