function ss_menu_widget($args, $widget_args = 1) { extract($args, EXTR_SKIP); if (is_numeric($widget_args)) { $widget_args = array('number' => $widget_args); } $widget_args = wp_parse_args($widget_args, array('number' => -1)); extract($widget_args, EXTR_SKIP); $options = get_option('ssMenu_widget_options'); if (!isset($options[$number])) { return; } $title = $options[$number]['title'] != "" ? $options[$number]['title'] : ""; if (!empty($title)) { echo $before_widget . $before_title . $title . $after_title; } if (method_exists('ssMenu', 'foldcats')) { ssMenu::$add_ssmenu_script = true; //switch on js loader ssMenu::foldcats($number); } else { echo "<ul>\n"; wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); echo "</ul>\n"; } echo $after_widget; }
/** * PHP 4 Compatible Constructor */ function ssMenu() { ssMenu::superslider_menu(); }