bbp_list_replies( $args = array() )
List replies
Description
Source
File: bp-forums/replies/functions.php
function bbp_list_replies( $args = array() ) { // Reset the reply depth bbpress()->reply_query->reply_depth = 0; // In reply loop bbpress()->reply_query->in_the_loop = true; $r = bbp_parse_args( $args, array( 'walker' => null, '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 $walker = new BBP_Walker_Reply; $walker->paged_walk( bbpress()->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ); bbpress()->max_num_pages = $walker->max_pages; bbpress()->reply_query->in_the_loop = false; }
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.