Walker_Page::end_el()
Outputs the end of the current element in the tree.
Method of the class: Walker_Page{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Walker_Page = new Walker_Page(); $Walker_Page->end_el( $output, $data_object, $depth, $args );
- $output(string) (required) (passed by reference — &)
- Used to append additional content. Passed by reference.
- $data_object(WP_Post) (required)
- Page data object. Not used.
- $depth(int)
- Depth of page.
Default: 0 (unused) - $args(array)
- Array of arguments.
Default: empty array
Notes
- See: Walker::end_el()
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. |
Walker_Page::end_el() Walker Page::end el code WP 6.7.1
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}"; }