A class for displaying various tree-like structures.
Extend the Walker class to use it, see examples at the below. Child classes do not need to implement all of the abstract methods in the class. The child only needs to implement the methods that are needed. Also, the methods are not strictly abstract in that the parameter definition needs to be followed. The child classes can have additional parameters.
Located in /wp-includes/class-wp-walker.php (line 15)
| Class | Description |
|---|---|
| Walker_Page | Create HTML list of pages. |
| Walker_PageDropdown | Create HTML dropdown list of pages. |
| Walker_Category | Create HTML list of categories. |
| Walker_CategoryDropdown | Create HTML dropdown list of Categories. |
| Walker_Nav_Menu | Create HTML list of nav menu items. |
| Walker_Comment | HTML comment list class. |
| Walker_Category_Checklist | Walker to output an unordered list of category checkbox <input> elements. |
Traverse elements to create list from elements.
Display one element if the element doesn't have any children otherwise, display the element and its children. Will only traverse up to the max depth and no ignore elements under that depth. It is possible to set the max depth to include all depths, see walk() method.
This method shouldn't be called directly, use the walk() method instead.
Ends the element output, if needed.
Additional parameters are used in child classes. The args parameter holds additional values that may be used with the child class methods.
Ends the list of after the elements are added.
Additional parameters are used in child classes. The args parameter holds additional values that may be used with the child class methods. This method finishes the list at the end of output of the elements.
paged_walk() - produce a page of nested elements
Given an array of hierarchical elements, the maximum depth, a specific page number, and number of elements per page, this function first determines all top level root elements belonging to that page, then lists them and all of their children in hierarchical order.
Start the element output.
Additional parameters are used in child classes. The args parameter holds additional values that may be used with the child class methods. Includes the element output also.
Starts the list before the elements are added.
Additional parameters are used in child classes. The args parameter holds additional values that may be used with the child class methods. This method is called at the start of the output list.
Display array of elements hierarchically.
It is a generic function which does not assume any existing order of elements. max_depth = -1 means flatly display every element. max_depth =
Documentation generated on Fri, 24 May 2013 23:18:28 +0000 by phpDocumentor 1.4.1