wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



walk_category_tree › WordPress Function

Seit2.1.0
Veraltetn/v
walk_category_tree ( $args )
Parameter:
  • (mixed) $args Elements array, maximum hierarchical depth and optional additional arguments.
    Erforderlich: Ja
Nutzt:
  • Walker_Category
Siehe:
  • Walker::walk()
Gibt zurück:
  • (string)
Definiert in:
Codex:
Changelog:
  • 5.3.0

Retrieves HTML list content for category list.



Quellcode

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 {
		/**
		 * @var Walker $walker
		 */
		$walker = $args[2]['walker'];
	}
	return $walker->walk( ...$args );
}