bp_get_notifications_permalink
Filters the notifications permalink.
Description
Parameters (2)
- 0. $retval (string)
- Permalink for the notifications.
- 1. $user_id (int)
- The user id.
Usage
- To run the hook, copy the example below.
- $retval = apply_filters( 'bp_get_notifications_permalink', $retval, $user_id );
- if ( !empty( $retval ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_notifications_permalink callback
- function filter_bp_get_notifications_permalink( $retval, $user_id ) {
- // make filter magic happen here...
- return $retval;
- };
- // add the filter
- add_filter( 'bp_get_notifications_permalink', 'filter_bp_get_notifications_permalink', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_notifications_permalink', 'filter_bp_get_notifications_permalink', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /bp-notifications/bp-notifications-template.php
- return apply_filters( 'bp_get_notifications_permalink', $retval, $user_id );