Walker_Page::end_el( string $output, WP_Post $data_object, int $depth, array $args = array() )

Outputs the end of the current element in the tree.

Description

See also

Parameters

$outputstringrequired
Used to append additional content. Passed by reference.
$data_objectWP_Postrequired
Page data object. Not used.
$depthintoptional
Depth of page. Default 0 (unused).
$argsarrayoptional
Array of arguments.

Default:array()

Source

public function end_el( &$output, $data_object, $depth = 0, $args = array() ) {
	if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) {
		$t = "\t";
		$n = "\n";
	} else {
		$t = '';
		$n = '';
	}
	$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.