Walker_Category::end_el() WordPress Method
The Walker_Category::end_el() method is used to end the element for a category in a WordPress category list. This is a method of the Walker_Category class, which is used to create category lists in WordPress.
Walker_Category::end_el( string $output, object $data_object, int $depth, array $args = array() ) #
Ends the element output, if needed.
Description
See also
Parameters
- $output
(string)(Required)Used to append additional content (passed by reference).
- $data_object
(object)(Required)Category data object. Not used.
- $depth
(int)(Optional) Depth of category. Not used.
- $args
(array)(Optional) An array of arguments. Only uses 'list' for whether should append to output. See wp_list_categories().
Default value: array()
Source
File: wp-includes/class-walker-category.php
public function end_el( &$output, $data_object, $depth = 0, $args = array() ) { if ( 'list' !== $args['style'] ) { return; } $output .= "</li>\n"; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.9.0 | Renamed $page to $data_object to match parent class for PHP 8 named parameter support. |
2.1.0 | Introduced. |