WordPress开发者和主题制作者的搜索引擎



walk_category_tree ›

Since2.1.0
已弃用n/a
walk_category_tree ( $args )
参数:
  • (mixed) $args ...$args Elements array, maximum hierarchical depth and optional additional arguments.
    Required: Yes
用户:
  • Walker_Category
查看:
  • Walker::walk()
返回:
  • (string)
定义在:
文档:
Change Log:
  • 5.3.0

Retrieve HTML list content for category list.



源码

function walk_category_tree( ...$args ) {
	// The user's options are the third parameter.
	if ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) {
		$walker = new Walker_Category;
	} else {
		$walker = $args[2]['walker'];
	}
	return $walker->walk( ...$args );
}