dropdown_cats()
Deprecated since 2.1.0. It is no longer supported and may be removed in future releases. Use wp_dropdown_categories() instead.
Deprecated method for generating a drop-down of categories.
No Hooks.
Returns
String.
Usage
dropdown_cats( $optionall, $all, $orderby, $order, $show_last_update, $show_count, $hide_empty, $optionnone, $selected, $exclude );
- $optionall(int)
- .
Default: 1 - $all(string)
- .
Default: 'All' - $orderby(string)
- .
Default: 'ID' - $order(string)
- .
Default: 'asc' - $show_last_update(int)
- .
- $show_count(int)
- .
- $hide_empty(int)
- .
Default: 1 - $optionnone(true|false)
- .
Default: false - $selected(int)
- .
- $exclude(int)
- .
Notes
Changelog
| Since 0.71 | Introduced. |
| Deprecated since 2.1.0 | Use wp_dropdown_categories() |
dropdown_cats() dropdown cats code WP 6.8.3
function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
$selected = 0, $exclude = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' );
$show_option_all = '';
if ( $optionall )
$show_option_all = $all;
$show_option_none = '';
if ( $optionnone )
$show_option_none = _x( 'None', 'Categories dropdown (show_option_none parameter)' );
$vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',
'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude');
$query = add_query_arg($vars, '');
return wp_dropdown_categories($query);
}