list_cats

函数


list_cats ( $optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children = false, $child_of = 0, $categories = 0, $recurse = 0, $feed = '', $feed_image = '', $exclude = '', $hierarchical = false )
参数
  • (int)
    $optionall
    Required:
    Default: 1
  • (string)
    $all
    Required:
    Default: ‘All’
  • (string)
    $sort_column
    Required:
    Default: ‘ID’
  • (string)
    $sort_order
    Required:
    Default: ‘asc’
  • (string)
    $file
    Required:
    Default: (empty)
  • (bool)
    $list
    Required:
    Default: true
  • (int)
    $optiondates
    Required:
  • (int)
    $optioncount
    Required:
  • (int)
    $hide_empty
    Required:
    Default: 1
  • (int)
    $use_desc_for_title
    Required:
    Default: 1
  • (bool)
    $children
    Required:
    Default: false
  • (int)
    $child_of
    Required:
  • (int)
    $categories
    Required:
  • (int)
    $recurse
    Required:
  • (string)
    $feed
    Required:
    Default: (empty)
  • (string)
    $feed_image
    Required:
    Default: (empty)
  • (string)
    $exclude
    Required:
    Default: (empty)
  • (bool)
    $hierarchical
    Required:
    Default: false
返回值
  • (null|false)
相关
  • wp_list_categories()
定义位置
  • wp-includes/deprecated.php
    , line 633
引入
0.71
弃用
2.1.0

列表中的类别。

function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
				$optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
				$recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );

	$query = compact('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');
	return wp_list_cats($query);
}