bp_get_the_notification_id
Filters the ID of the notification currently being iterated on.
Description
Parameters (1)
- 0. $buddypress (int) =>
buddypress()->notifications->query_loop->notification->id
- ID of the notification being iterated on.
Usage
- To run the hook, copy the example below.
- $buddypress = apply_filters( 'bp_get_the_notification_id', $buddypress );
- if ( !empty( $buddypress ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_the_notification_id callback
- function filter_bp_get_the_notification_id( $buddypress ) {
- // make filter magic happen here...
- return $buddypress;
- };
- // add the filter
- add_filter( 'bp_get_the_notification_id', 'filter_bp_get_the_notification_id', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_the_notification_id', 'filter_bp_get_the_notification_id', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-notifications/bp-notifications-template.php
- return apply_filters( 'bp_get_the_notification_id', buddypress()->notifications->query_loop->notification->id );