a function
-
function itx_menu_($args){ $cat_inc=$page_inc=0; $menu_class=''; extract(itx_get_option('menu')); extract(wp_parse_args($args)); if($theme_location=='top'){ $home=$top_home; $depth=$top_depth; $show=$top_show; } if ($show){ echo '<ul class="'.$menu_class.'">'; if ($home) echo '<li><a href="'.get_option('home').'">'.$home.'</a></li>'; if ($cat_inc){ @sort($cat_inc); $cat_inc=@implode(',',$cat_inc); $opt="&include=$cat_inc"; if ($cat_sortby) {$opt.="&orderby=".$cat_sortby;}; if ($cat_order) {$opt.="&order=".$cat_order;}; $cat_args="title_li=&depth=$depth$opt"; } else { $cat_args='title_li=&number=15'; } if ($page_inc){ @sort($page_inc); $page_inc=@implode(',',$page_inc); $opt="&include=$page_inc"; if ($cat_sortby) {$opt.="&orderby=".$cat_sortby;}; if ($cat_order) {$opt.="&order=".$cat_order;}; $page_args="title_li=&depth=$depth$opt"; } else { $page_args='title_li=&number=9'; } if ($show=='cat'){ wp_list_categories($cat_args); } elseif ($show=='page'){ wp_list_pages($page_args); } elseif ($show=='cp'){ wp_list_categories($cat_args); wp_list_pages($page_args); } elseif ($show=='pc'){ wp_list_pages($page_args); wp_list_categories($cat_args); } echo'</ul>'; } }
can’t understand this function well, expect someone can explain it for me. thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘a function’ is closed to new replies.