bp_activity_permalink_redirect_url
Filter the intended redirect url before the redirect occurs for the single activity item.
Description
Parameters (1)
- 0. $array (array) =>
array( $redirect, &$activity )
- Array with url to redirect to and activity related to the redirect.
Usage
- To run the hook, copy the example below.
- $array = apply_filters( 'bp_activity_permalink_redirect_url', $array );
- if ( !empty( $array ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_activity_permalink_redirect_url callback
- function filter_bp_activity_permalink_redirect_url( $array ) {
- // make filter magic happen here...
- return $array;
- };
- // add the filter
- add_filter( 'bp_activity_permalink_redirect_url', 'filter_bp_activity_permalink_redirect_url', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_activity_permalink_redirect_url', 'filter_bp_activity_permalink_redirect_url', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-activity/bp-activity-actions.php
- if ( ! $redirect = apply_filters_ref_array( 'bp_activity_permalink_redirect_url', array( $redirect, &$activity ) ) ) {