Rest_BBP_Walker_Reply::display_element( $element = false, $children_elements = array(), $max_depth, $depth, $args = array(), $output = '' )
Description
Source
File: bp-forums/classes/class-bp-rest-bbp-walker-reply.php
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | 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 |
---|---|
2.4.0 | 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.