bp_activity_privacy_last_activity

The BuddyPress Activity Privacy bp activity privacy last function.

Description

bp_activity_privacy_last_activity( $last_activity ); 

Parameters (1)

0. $last_activity
The last activity.

Usage

  1. if ( !function_exists( 'bp_activity_privacy_last_activity' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-activity-privacy/includes/bp-activity-privacy-filters.php'; 
  3.  
  4. // The last activity. 
  5. $last_activity = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_activity_privacy_last_activity($last_activity); 
  9.  

Defined (1)

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

/includes/bp-activity-privacy-filters.php  
  1. function bp_activity_privacy_last_activity( $last_activity ) { 
  2. if( isset($last_activity) ) { 
  3. $has_activities = false; 
  4. $activities = new stdClass(); 
  5. $activities->activities = array(); 
  6. $activities->activities[] = $last_activity; 
  7. bp_visibility_activity_filter($has_activities, $activities); 
  8.  
  9. if ( empty($activities) ) 
  10. $last_activity = null; 
  11.  
  12. return $last_activity;