+/**
+ * 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.
+ *
+ * @package WordPress
+ * @since 2.1.0
+ * @abstract
+ */
+class Walker {
+ /**
+ * What the class handles.
+ *
+ * @since 2.1.0
+ * @var string
+ * @access public
+ */
+ var $tree_type;
+
+ /**
+ * DB fields to use.
+ *
+ * @since 2.1.0
+ * @var array
+ * @access protected
+ */
+ var $db_fields;
+
+ /**
+ * Max number of pages walked by the paged walker
+ *
+ * @since 2.7.0
+ * @var int
+ * @access protected
+ */
+ var $max_pages = 1;
+
+ /**
+ * 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.
+ *
+ * @since 2.1.0
+ * @abstract
+ *
+ * @param string $output Passed by reference. Used to append additional content.
+ */
+ function start_lvl(&$output) {}
+
+ /**
+ * 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.
+ *
+ * @since 2.1.0
+ * @abstract
+ *
+ * @param string $output Passed by reference. Used to append additional content.
+ */
+ function end_lvl(&$output) {}
+
+ /**
+ * 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.
+ *
+ * @since 2.1.0
+ * @abstract
+ *
+ * @param string $output Passed by reference. Used to append additional content.
+ */
+ function start_el(&$output) {}
+
+ /**
+ * 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.
+ *
+ * @since 2.1.0
+ * @abstract
+ *
+ * @param string $output Passed by reference. Used to append additional content.
+ */
+ function end_el(&$output) {}
+
+ /**
+ * 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.
+ *
+ * @since 2.5.0
+ *
+ * @param object $element Data object
+ * @param array $children_elements List of elements to continue traversing.
+ * @param int $max_depth Max depth to traverse.
+ * @param int $depth Depth of current element.
+ * @param array $args
+ * @param string $output Passed by reference. Used to append additional content.
+ * @return null Null on failure with no changes to parameters.
+ */
+ function display_element( $element, &$children_elements, $max_depth, $depth=0, $args, &$output ) {