WordPress at a glance
function is not described

Walker_Nav_Menu::end_el() public WP 3.0.0

Ends the element output, if needed.

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

No Hooks.

Return

Null. Nothing.

Usage

$Walker_Nav_Menu = new Walker_Nav_Menu();
$Walker_Nav_Menu->end_el( $output, $item, $depth, $args );
$output(string) (required) (passed by reference — &)
Used to append additional content (passed by reference).
$item(WP_Post) (required)
Page data object. Not used.
$depth(int)
Depth of page. Not Used.
Default: 0
$args(stdClass)
An object of wp_nav_menu() arguments.
Default: null

Notes

  • See: Walker::end_el()

Changelog

Since 3.0.0 Introduced.

Code of Walker_Nav_Menu::end_el() WP 5.5.1

<?php
public function end_el( &$output, $item, $depth = 0, $args = null ) {
	if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) {
		$t = '';
		$n = '';
	} else {
		$t = "\t";
		$n = "\n";
	}
	$output .= "</li>{$n}";
}