wpseek.com
A WordPress-centric search engine for devs and theme authors



dropdown_cats › WordPress Function

Since0.71
Deprecated2.1.0
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 )
Parameters: (10)
  • (int) $optionall
    Required: No
    Default: 1
  • (string) $all
    Required: No
    Default: 'All'
  • (string) $orderby
    Required: No
    Default: 'ID'
  • (string) $order
    Required: No
    Default: 'asc'
  • (int) $show_last_update
    Required: No
    Default:
  • (int) $show_count
    Required: No
    Default:
  • (int) $hide_empty
    Required: No
    Default: 1
  • (bool) $optionnone
    Required: No
    Default: false
  • (int) $selected
    Required: No
    Default:
  • (int) $exclude
    Required: No
    Default:
See:
Returns:
  • (string)
Defined at:
Codex:

Deprecated method for generating a drop-down of categories.



Source

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 = __('None');

	$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);
}