list_cats

Lists categories.

Description

(false|null) list_cats( (int) $optionall = 1, (string) $all = 'All', (string) $sort_column = 'ID', (string) $sort_order = 'asc', (string) $file = '', (constant) $list = true, (int) $optiondates = 0, (int) $optioncount = 0, (int) $hide_empty = 1, (int) $use_desc_for_title = 1, (constant) $children = false, (int) $child_of = 0, (int) $categories = 0, (int) $recurse = 0, (string) $feed = '', (string) $feed_image = '', (string) $exclude = '', (constant) $hierarchical = false ); 

Returns (false|null)

Parameters (18)

0. $optionall — Optional. (int) => 1
The optionall.
1. $all — Optional. (string) => 'All'
The all.
2. $sort_column — Optional. (string) => 'ID'
The sort column.
3. $sort_order — Optional. (string) => 'asc'
The sort order.
4. $file — Optional. (string) => ''
The file.
5. $list — Optional. (constant) => true
The list.
6. $optiondates — Optional. (int)
The optiondates.
7. $optioncount — Optional. (int)
The optioncount.
8. $hide_empty — Optional. (int) => 1
The hide empty.
9. $use_desc_for_title — Optional. (int) => 1
The use desc for title.
10. $children — Optional. (constant) => false
The children.
11. $child_of — Optional. (int)
The child of.
12. $categories — Optional. (int)
The categories.
13. $recurse — Optional. (int)
The recurse.
14. $feed — Optional. (string) => ''
The feed.
15. $feed_image — Optional. (string) => ''
The feed image.
16. $exclude — Optional. (string) => ''
The exclude.
17. $hierarchical — Optional. (constant) => false
The hierarchical.

Usage

  1. if ( !function_exists( 'list_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 sort column. 
  11. $sort_column = 'ID'; 
  12.  
  13. // The sort order. 
  14. $sort_order = 'asc'; 
  15.  
  16. // The file. 
  17. $file = ''; 
  18.  
  19. // The list. 
  20. $list = true; 
  21.  
  22. // The optiondates. 
  23. $optiondates = -1; 
  24.  
  25. // The optioncount. 
  26. $optioncount = -1; 
  27.  
  28. // The hide empty. 
  29. $hide_empty = 1; 
  30.  
  31. // The use desc for title. 
  32. $use_desc_for_title = 1; 
  33.  
  34. // The children. 
  35. $children = false; 
  36.  
  37. // The child of. 
  38. $child_of = -1; 
  39.  
  40. // The categories. 
  41. $categories = -1; 
  42.  
  43. // The recurse. 
  44. $recurse = -1; 
  45.  
  46. // The feed. 
  47. $feed = ''; 
  48.  
  49. // The feed image. 
  50. $feed_image = ''; 
  51.  
  52. // The exclude. 
  53. $exclude = ''; 
  54.  
  55. // The hierarchical. 
  56. $hierarchical = false; 
  57.  
  58. // NOTICE! Understand what this does before running. 
  59. $result = list_cats($optionall, $all, $sort_column, $sort_order, $file, $list, $optiondates, $optioncount, $hide_empty, $use_desc_for_title, $children, $child_of, $categories, $recurse, $feed, $feed_image, $exclude, $hierarchical); 
  60.  

Defined (1)

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

/wp-includes/deprecated.php  
  1. function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,  
  2. $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,  
  3. $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { 
  4. _deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' ); 
  5.  
  6. $query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',  
  7. 'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical'); 
  8. return wp_list_cats($query);