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

Top ↑

See also


Top ↑

Parameters

$output string Required
Used to append additional content. Passed by reference.
$data_object WP_Post Required
Page data object. Not used.
$depth int Optional
Depth of page. Default 0 (unused).
$args array Optional
Array of arguments.

Default: array()


Top ↑

Source

File: wp-includes/class-walker-page.php. View all references

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}";
}

Top ↑

Changelog

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.

Top ↑

User Contributed Notes

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