bp_get_the_notification_description
Filters the full-text description for a specific notification.
Description
apply_filters( 'bp_get_the_notification_description', (string) $description, (object) $notification );
Parameters (2)
- 0. $description (string)
- Full-text description for a specific notification.
- 1. $notification (object)
- Notification object.
Usage
- To run the hook, copy the example below.
- $description = apply_filters( 'bp_get_the_notification_description', $description, $notification );
- if ( !empty( $description ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_the_notification_description callback
- function filter_bp_get_the_notification_description( $description, $notification ) {
- // make filter magic happen here...
- return $description;
- };
- // add the filter
- add_filter( 'bp_get_the_notification_description', 'filter_bp_get_the_notification_description', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_the_notification_description', 'filter_bp_get_the_notification_description', 10, 2 );
Defined (1)
The filter is defined in the following location(s).
- /bp-notifications/bp-notifications-template.php
- return apply_filters( 'bp_get_the_notification_description', $description, $notification );