post_type) && !empty($screen->post_type))
$post_type = $screen->post_type;
else
{
switch($screen->parent_file)
{
case "upload.php" :
$post_type = 'attachment';
break;
default:
$post_type = 'post';
}
}
}
$post_type_data = get_post_type_object($post_type);
if (!taxonomy_exists($taxonomy))
$taxonomy = '';
?>
'term_order',
'depth' => 0,
'child_of' => 0,
'hide_empty' => 0
);
$taxonomy_terms = get_terms($taxonomy, $args);
$output = '';
if (count($taxonomy_terms) > 0)
{
$output = TOwalkTree($taxonomy_terms, $args['depth'], $args);
}
echo $output;
}
function TOwalkTree($taxonomy_terms, $depth, $r)
{
$walker = new TO_Terms_Walker;
$args = array($taxonomy_terms, $depth, $r);
return call_user_func_array(array(&$walker, 'walk'), $args);
}
?>