dropdown_cats

Deprecated method for generating a drop-down of categories.

Description

(string) dropdown_cats( (int) $optionall = 1, (string) $all = 'All', (string) $orderby = 'ID', (string) $order = 'asc', (int) $show_last_update = 0, (int) $show_count = 0, (int) $hide_empty = 1, (constant) $optionnone = false, (int) $selected = 0, (int) $exclude = 0 ); 

Returns (string)

Parameters (10)

0. $optionall — Optional. (int) => 1
The optionall.
1. $all — Optional. (string) => 'All'
The all.
2. $orderby — Optional. (string) => 'ID'
The orderby.
3. $order — Optional. (string) => 'asc'
The order.
4. $show_last_update — Optional. (int)
The show last update.
5. $show_count — Optional. (int)
The show count.
6. $hide_empty — Optional. (int) => 1
The hide empty.
7. $optionnone — Optional. (constant) => false
The optionnone.
8. $selected — Optional. (int)
The selected.
9. $exclude — Optional. (int)
The exclude.

Usage

  1. if ( !function_exists( 'dropdown_cats' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The optionall. 
  5. $optionall = 1; 
  6.  
  7. // The all. 
  8. $all = 'All'; 
  9.  
  10. // The orderby. 
  11. $orderby = 'ID'; 
  12.  
  13. // The order. 
  14. $order = 'asc'; 
  15.  
  16. // The show last update. 
  17. $show_last_update = -1; 
  18.  
  19. // The show count. 
  20. $show_count = -1; 
  21.  
  22. // The hide empty. 
  23. $hide_empty = 1; 
  24.  
  25. // The optionnone. 
  26. $optionnone = false; 
  27.  
  28. // The selected. 
  29. $selected = -1; 
  30.  
  31. // The exclude. 
  32. $exclude = -1; 
  33.  
  34. // NOTICE! Understand what this does before running. 
  35. $result = dropdown_cats($optionall, $all, $orderby, $order, $show_last_update, $show_count, $hide_empty, $optionnone, $selected, $exclude); 
  36.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',  
  2. $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,  
  3. $selected = 0, $exclude = 0) { 
  4. _deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' ); 
  5.  
  6. $show_option_all = ''; 
  7. if ( $optionall ) 
  8. $show_option_all = $all; 
  9.  
  10. $show_option_none = ''; 
  11. if ( $optionnone ) 
  12. $show_option_none = __('None'); 
  13.  
  14. $vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',  
  15. 'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude'); 
  16. $query = add_query_arg($vars, ''); 
  17. return wp_dropdown_categories($query);