Walker_Category::end_el()publicWP 2.1.0

Ends the element output, if needed.

{} It's a method of the class: Walker_Category{}

No Hooks.

Return

null. Nothing.

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

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.

Code of Walker_Category::end_el() WP 6.0

public function end_el( &$output, $data_object, $depth = 0, $args = array() ) {
	if ( 'list' !== $args['style'] ) {
		return;
	}

	$output .= "</li>\n";
}