bp_get_activity_filter_link_href
Filters the activity filter link URL for the current activity component.
Description
Parameters (2)
- 0. $link (string)
- The URL for the current component.
- 1. $component (string)
- The current component getting links constructed for.
Usage
- To run the hook, copy the example below.
- $link = apply_filters( 'bp_get_activity_filter_link_href', $link, $component );
- if ( !empty( $link ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_activity_filter_link_href callback
- function filter_bp_get_activity_filter_link_href( $link, $component ) {
- // make filter magic happen here...
- return $link;
- };
- // add the filter
- add_filter( 'bp_get_activity_filter_link_href', 'filter_bp_get_activity_filter_link_href', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_activity_filter_link_href', 'filter_bp_get_activity_filter_link_href', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /bp-activity/bp-activity-template.php
- $link = apply_filters( 'bp_get_activity_filter_link_href', $link, $component );