Esempio n. 1
0
function widget_race_submenu($args)
{
    extract($args, EXTR_SKIP);
    global $post;
    $parent = '';
    if ($post->post_parent) {
        $parent .= $post->post_parent;
    } else {
        if (is_page() && !is_front_page()) {
            $parent .= $post->ID;
        }
    }
    $submenu = race_build_submenu($parent);
    if ($submenu) {
        echo $before_widget . $submenu . $after_widget;
    }
}
Esempio n. 2
0
 function build_menu($echo = true)
 {
     if (empty($this->instance_args)) {
         return '';
     }
     extract($this->instance_args);
     $child = array_shift(query_posts("pagename={$path}"));
     $menu = race_build_submenu((int) $child->{$key});
     if ($echo) {
         echo $menu;
     } else {
         return $menu;
     }
 }