Walker_Category::end_el( string $output, object $data_object, int $depth, array $args = array() )

Ends the element output, if needed.

Description

See also

Parameters

$outputstringrequired
Used to append additional content (passed by reference).
$data_objectobjectrequired
Category data object. Not used.
$depthintoptional
Depth of category. Not used.
$argsarrayoptional
An array of arguments. Only uses 'list' for whether should append to output. See wp_list_categories() .
More Arguments from wp_list_categories( … $args )Array or string of arguments. See WP_Term_Query::__construct() for information on accepted arguments.

Default:array()

Source

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

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

Changelog

VersionDescription
5.9.0Renamed $page to $data_object to match parent class for PHP 8 named parameter support.
2.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.