apply_filters( "bp_messages_{$amount}_new_message_notification", string $return, int $total_items, string $text, int $item_id, int $secondary_item_id )

Filters the new message notification text before the notification is created.

Description

This is a dynamic filter. Possible filter names are:

  • ‘bp_messages_multiple_new_message_notification’.
  • ‘bp_messages_single_new_message_notification’.

Parameters

$return

(string) Notification text.

$total_items

(int) Number of messages referred to by the notification.

$text

(string) The raw notification test (ie, not wrapped in a link).

$item_id

(int) ID of the associated item.

$secondary_item_id

(int) ID of the secondary associated item.

Source

File: bp-messages/bp-messages-notifications.php

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.