BBP_Walker_Reply::display_element( $element = false, $children_elements = array(), $max_depth, $depth, $args = array(), $output = '' )
Description
Source
File: bp-forums/common/classes.php
public function display_element( $element = false, &$children_elements = array(), $max_depth = 0, $depth = 0, $args = array(), &$output = '' ) { if ( empty( $element ) ) return; // Get element's id $id_field = $this->db_fields['id']; $id = $element->$id_field; // Display element parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); // If we're at the max depth and the current element still has children, loop over those // and display them at this level to prevent them being orphaned to the end of the list. if ( ( $max_depth <= (int) $depth + 1 ) && isset( $children_elements[$id] ) ) { foreach ( $children_elements[$id] as $child ) { $this->display_element( $child, $children_elements, $max_depth, $depth, $args, $output ); } unset( $children_elements[$id] ); } }
Changelog
Version | Description |
---|---|
bbPress (r4944) | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.