vapvarun

change the class of Wall activity based on their privacy

Jul 8th, 2016
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. //You can paste the following code in functions.php of your child-theme:
  2.  
  3. add_filter( 'bp_get_activity_css_class', 'bbwall_activity_css_class_privacy' );
  4. function bbwall_activity_css_class_privacy( $classes='' ){
  5. global $activities_template;
  6. if ( function_exists( 'buddyboss_wall' ) && buddyboss_wall()->is_wall_privacy_enabled() ){
  7. $classes .= ' privacy-' . bp_activity_get_meta( $activities_template->activity->id, 'bbwall-activity-privacy', true );
  8. }
  9. return $classes;
  10. }
Add Comment
Please, Sign In to add comment