bp_activity_screen_single_activity_permalink

Fires before the loading of a single activity template file.

Description

do_action( 'bp_activity_screen_single_activity_permalink', (BP_Activity_Activity) $activity, (bool) $has_access ); 

Parameters (2)

0. $activity (BP_Activity_Activity)
Object representing the current activity item being displayed.
1. $has_access (bool)
Whether or not the current user has access to view activity.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bp_activity_screen_single_activity_permalink', $activity, $has_access ); 
The following example is for adding a hook callback.
  1. // define the bp_activity_screen_single_activity_permalink callback 
  2. function action_bp_activity_screen_single_activity_permalink( $activity, $has_access ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bp_activity_screen_single_activity_permalink', 'action_bp_activity_screen_single_activity_permalink', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bp_activity_screen_single_activity_permalink', 'action_bp_activity_screen_single_activity_permalink', 10, 2 ); 

Defined (1)

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

/bp-activity/bp-activity-screens.php  
  1. do_action( 'bp_activity_screen_single_activity_permalink', $activity, $has_access );