bp_get_notifications_slug
Filters the notifications component slug.
Description
Parameters (1)
- 0. $buddypress (string) =>
buddypress()->notifications->slug
- Notifications component slug.
Usage
- To run the hook, copy the example below.
- $buddypress = apply_filters( 'bp_get_notifications_slug', $buddypress );
- if ( !empty( $buddypress ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_notifications_slug callback
- function filter_bp_get_notifications_slug( $buddypress ) {
- // make filter magic happen here...
- return $buddypress;
- };
- // add the filter
- add_filter( 'bp_get_notifications_slug', 'filter_bp_get_notifications_slug', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_notifications_slug', 'filter_bp_get_notifications_slug', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-notifications/bp-notifications-template.php
- return apply_filters( 'bp_get_notifications_slug', buddypress()->notifications->slug );