bbp_list_replies

List replies.

Description

bbp_list_replies( (array) $args = array() ); 

Parameters (1)

0. $args — Optional. (array) => array()
The args.

Usage

  1. if ( !function_exists( 'bbp_list_replies' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/replies/functions.php'; 
  3.  
  4. // The args. 
  5. $args = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_list_replies($args); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/replies/functions.php  
  1. function bbp_list_replies( $args = array() ) { 
  2.  
  3. // Reset the reply depth 
  4. bbpress)->reply_query->reply_depth = 0; 
  5.  
  6. // In reply loop 
  7. bbpress)->reply_query->in_the_loop = true; 
  8.  
  9. $r = bbp_parse_args( $args, array( 
  10. walker => null,  
  11. 'max_depth' => bbp_thread_replies_depth(),  
  12. 'style' => 'ul',  
  13. 'callback' => null,  
  14. 'end_callback' => null,  
  15. 'page' => 1,  
  16. 'per_page' => -1 
  17. ), 'list_replies' ); 
  18.  
  19. // Get replies to loop through in $_replies 
  20. $walker = new BBP_Walker_Reply; 
  21. $walker->paged_walk(bbpress)->reply_query->posts, $r['max_depth'], $r['page'], $r['per_page'], $r ); 
  22.  
  23. bbpress)->max_num_pages = $walker->max_pages; 
  24. bbpress)->reply_query->in_the_loop = false;