Walker_Category::end_el()
Ends the element output, if needed.
Method of the class: Walker_Category{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Walker_Category = new Walker_Category(); $Walker_Category->end_el( $output, $data_object, $depth, $args );
- $output(string) (required) (passed by reference — &)
- Used to append additional content (passed by reference).
- $data_object(object) (required)
- Category data object. Not used.
- $depth(int)
- Depth of category. Not used.
- $args(array)
- An array of arguments. Only uses 'list' for whether should append to output. See wp_list_categories().
Default: empty array
Notes
- See: Walker::end_el()
Changelog
Since 2.1.0 | Introduced. |
Since 5.9.0 | Renamed $page to $data_object to match parent class for PHP 8 named parameter support. |
Walker_Category::end_el() Walker Category::end el code WP 6.6.2
public function end_el( &$output, $data_object, $depth = 0, $args = array() ) { if ( 'list' !== $args['style'] ) { return; } $output .= "</li>\n"; }