bbp_list_replies( $args = array() )
List threaded replies
Description Description
Source Source
File: includes/replies/functions.php
function bbp_list_replies( $args = array() ) { // Get bbPress $bbp = bbpress(); // Reset the reply depth $bbp->reply_query->reply_depth = 0; // In reply loop $bbp->reply_query->in_the_loop = true; // Parse arguments $r = bbp_parse_args( $args, array( 'walker' => new BBP_Walker_Reply(), 'max_depth' => bbp_thread_replies_depth(), 'style' => 'ul', 'callback' => null, 'end_callback' => null, 'page' => 1, 'per_page' => -1 ), 'list_replies' ); // Get replies to loop through in $_replies echo '<ul>' . $r['walker']->paged_walk( $bbp->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ) . '</ul>'; $bbp->max_num_pages = $r['walker']->max_pages; $bbp->reply_query->in_the_loop = false; }
Changelog Changelog
Version | Description |
---|---|
2.4.0 | Introduced. |