bb_get_recent_user_replies

The BuddyPress bb get recent user replies function.

Description

bb_get_recent_user_replies( $user_id ); 

Parameters (1)

0. $user_id
The user id.

Usage

  1. if ( !function_exists( 'bb_get_recent_user_replies' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-posts.php'; 
  3.  
  4. // The user id. 
  5. $user_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_get_recent_user_replies($user_id); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-posts.php  
  1. function bb_get_recent_user_replies( $user_id ) { 
  2. global $bbdb; 
  3. $user_id = (int) $user_id; 
  4.  
  5. $post_query = new BB_Query
  6. 'post',  
  7. array( 
  8. 'post_author_id' => $user_id,  
  9. 'order_by' => 'post_id',  
  10. 'post_id_only' => true,  
  11. ),  
  12. ); 
  13.  
  14. return $post_query->results;