Changeset 6317 for trunk/src/includes/replies/functions.php
- Timestamp:
- 02/26/2017 08:15:20 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/functions.php
r6310 r6317 2539 2539 function bbp_list_replies( $args = array() ) { 2540 2540 2541 // Get bbPress 2542 $bbp = bbpress(); 2543 2541 2544 // Reset the reply depth 2542 bbpress()->reply_query->reply_depth = 0;2545 $bbp->reply_query->reply_depth = 0; 2543 2546 2544 2547 // In reply loop 2545 bbpress()->reply_query->in_the_loop = true; 2546 2548 $bbp->reply_query->in_the_loop = true; 2549 2550 // Parse arguments 2547 2551 $r = bbp_parse_args( $args, array( 2548 'walker' => n ull,2552 'walker' => new BBP_Walker_Reply, 2549 2553 'max_depth' => bbp_thread_replies_depth(), 2550 2554 'style' => 'ul', … … 2556 2560 2557 2561 // Get replies to loop through in $_replies 2558 $walker = new BBP_Walker_Reply; 2559 $walker->paged_walk( bbpress()->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ); 2560 2561 bbpress()->max_num_pages = $walker->max_pages; 2562 bbpress()->reply_query->in_the_loop = false; 2562 echo '<ul>' . $r['walker']->paged_walk( $bbp->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ) . '</ul>'; 2563 2564 $bbp->max_num_pages = $r['walker']->max_pages; 2565 $bbp->reply_query->in_the_loop = false; 2563 2566 } 2564 2567
Note: See TracChangeset
for help on using the changeset viewer.