hasChildCategories($main_cat))) {
$url = get_category_link($main_cat);
die("window.location = '$url';");
}
$options = get_option(DACD_WIDGET_OPTION);
if ( !isset($options[$number]) )
return;
//$title = $options[$widget_number]['title'];
//$text = $options[$widget_number]['text'];
$title = $options[$number]['title'];
$text = $options[$number]['text'];
$emptyshow = $options[$number]['emptyshow'];
$countshow = $options[$number]['countshow'];
$countwhat = $options[$number]['countwhat'];
$sortby = $options[$number]['sortby'];
$direction = $options[$number]['direction'];
//Creat MYSQL sort by
switch ($sortby) {
case "titleasc":
$sort = "$wpdb->terms.name ASC";
break;
case "titledesc":
$sort = "$wpdb->terms.name DESC";
break;
case "postcountasc":
$sort = "$wpdb->term_taxonomy.count ASC";
break;
case "postcountdesc":
$sort = "$wpdb->term_taxonomy.count DESC";
break;
}
//Show empty
if ($emptyshow == '1') {
$emptyshow = true;
}
else {
$emptyshow = false;
}
//show count
if ($countshow == '1') {
$countshow = true;
}
else {
$countshow = false;
}
for($j=0;$j<=$cd->totalLevels();$j++){
//set variable names eg: $level1
$leveltitle[$j] = attribute_escape($options[$number]["level$j"]);
}
$pcat = $cd->displayCatLink($main_cat);
//
//
//
$wcat = "