Walker_Category_Checklist::end_el( string $output, WP_Term $data_object, int $depth, array $args = array() )

Ends the element output, if needed.


Top ↑

See also

Top ↑


$output string Required
Used to append additional content (passed by reference).
$data_object WP_Term Required
The current term object.
$depth int Required
Depth of the term in reference to parents. Default 0.
$args array Optional
An array of arguments. @see wp_terms_checklist()
More Arguments from wp_terms_checklist( ... $args ) Array or string of arguments for generating a terms checklist.
  • descendants_and_selfint
    ID of the category to output along with its descendants.
    Default 0.
  • selected_catsint[]
    Array of category IDs to mark as checked. Default false.
  • popular_catsint[]
    Array of category IDs to receive the "popular-category" class.
    Default false.
  • walkerWalker
    Walker object to use to build the output. Default empty which results in a Walker_Category_Checklist instance being used.
  • taxonomystring
    Taxonomy to generate the checklist for. Default 'category'.
  • checked_ontopbool
    Whether to move checked items out of the hierarchy and to the top of the list. Default true.
  • echobool
    Whether to echo the generated markup. False to return the markup instead of echoing it. Default true.

Default: array()

Top ↑


File: wp-admin/includes/class-walker-category-checklist.php. View all references

public function end_el( &$output, $data_object, $depth = 0, $args = array() ) {
	$output .= "</li>\n";

Top ↑


Version Description
5.9.0 Renamed $category to $data_object to match parent class for PHP 8 named parameter support.
2.5.1 Introduced.

Top ↑

User Contributed Notes

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