function test_get_categories($args = '') { if ( is_array($args) ) $r = &$args; else parse_str($args, $r); $defaults = array('show_option_all' => '', 'orderby' => 'name', 'order' => 'ASC', 'show_last_update' => 0, 'style' => 'list', 'show_count' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1, 'child_of' => 0, 'feed' => '', 'feed_image' => '', 'exclude' => '', 'hierarchical' => true, 'title_li' => __('Categories')); $r = array_merge($defaults, $r); if ( !isset($r['pad_counts']) && $r['show_count'] && $r['hierarchical'] ) $r['pad_counts'] = true; if ( isset($r['show_date']) ) $r['include_last_update_time'] = $r['show_date']; extract($r); $categories = get_categories($r); return $categories; }