Add wp_dropdown_categories(). Deprecate dropdown_categories(). Add wp_list_categories() and make wp_list_cats() an alias.

git-svn-id: https://develop.svn.wordpress.org/trunk@3591 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-03-02 04:51:24 +00:00
parent 25dc212067
commit 621da95d0d
2 changed files with 115 additions and 56 deletions
+18
View File
@@ -411,4 +411,22 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
return wp_list_cats($query);
}
function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
$show_last_update = 0, $show_counts = 0, $hide_empty = 1, $optionnone = FALSE,
$selected = 0, $exclude = 0) {
$show_option_all = '';
if ( $optionall )
$show_option_all = $all;
$show_option_none = '';
if ( $optionnone )
$show_option_none = __('None');
$vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',
'show_last_update', 'show_counts', 'hide_empty', 'selected', 'exclude');
$query = add_query_arg($vars, '');
return wp_dropdown_categories($query);
}
?>