bp_blogs_activity_new_post_primary_link

The BuddyPress bp blogs activity new post primary link hook.

Description

apply_filters( 'bp_blogs_activity_new_post_primary_link', (unknown) $post_url, (unknown) $post_id, (unknown) $post_post_type ); 

Parameters (3)

0. $post_url (unknown)
The post url.
1. $post_id (unknown)
The post id.
2. $post_post_type (unknown)
The post post type.

Usage

To run the hook, copy the example below.
  1. $post_url = apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_url, $post_id, $post_post_type ); 
  2.  
  3. if ( !empty( $post_url ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_blogs_activity_new_post_primary_link callback 
  2. function filter_bp_blogs_activity_new_post_primary_link( $post_url, $post_id, $post_post_type ) { 
  3. // make filter magic happen here... 
  4. return $post_url
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_blogs_activity_new_post_primary_link', 'filter_bp_blogs_activity_new_post_primary_link', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_blogs_activity_new_post_primary_link', 'filter_bp_blogs_activity_new_post_primary_link', 10, 3 ); 

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. $activity_primary_link = apply_filters( 'bp_blogs_activity_new_post_primary_link', $post_url, $post_id, $post->post_type );