Advertisement
Guest User

Untitled

a guest
Oct 16th, 2011
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. function bp_question_record_activity( $args = '' ) {
  2. global $bp;
  3.  
  4. if ( !function_exists( 'bp_activity_add' ) )
  5. return false;
  6.  
  7. $defaults = array(
  8. 'user_id' => $bp->loggedin_user->id,
  9. 'action' => '',
  10. 'type' => false,
  11. );
  12.  
  13. $r = wp_parse_args( $args, $defaults );
  14. extract( $r );
  15.  
  16. return bp_activity_add( array( 'user_id' => $bp->loggedin_user->id, 'action' => 'a question was added', 'type' => qa_question ) );
  17. }
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement