Advertisement
vapvarun

Remove bbPress replies from BuddyPress activity args

Jul 14th, 2021
1,424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. /**
  2.  * Remove bbPress replies from BuddyPress activity args
  3.  *
  4.  * @param array $r Activity args.
  5.  *
  6.  * @return bool
  7.  */
  8. function wb_modify_record_activity_args( $r ) {
  9.  
  10.     if ( $r['type'] && in_array( $r['type'], array( 'bbp_reply_create', 'bbp_reply_edit' ) ) ) {
  11.         $r = false;
  12.     }
  13.  
  14.     return $r;
  15. }
  16. add_filter( 'bbp_after_record_activity_parse_args', 'wb_modify_record_activity_args' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement