Skip to:

02/03/2016 07:55:29 PM (8 years ago)

Emails: un-deprecate bp_activity_sent_mention_email action.

All functions where we send an email trigger a final action after the email's sent. The recent changes for BP 2.5's email overhaul moved all of these into the 2.5 backwards compatibility file, which is triggered by the new "email sent" actions and filters in bp_send_email().

Subsequent investigation of all similar actions revealed that only bp_activity_sent_mention_email had core functions hooked to it. Also, bp_activity_sent_mention_email was the only action hook that *always* triggered -- the other similar actions did not trigger if the recipient had chosen to disable email notifications. This change moves the action back into its original location, fixing unit tests and notification functionality, but it does not pass the subject/content/message arguments to the action as we no longer have access to those outside of an BP_Email instance.

Follow-up is required to ensure the 2.5 backwards compatibility code is being loaded correctly, or if this was some quirk of our unit test environment.

See #6592

1 edited


  • trunk/src/bp-core/deprecated/2.5.php

    r10499 r10500  
    665665function bp_core_deprecated_email_actions( $email, $delivery_status ) {
    666666    $pre_2_5_emails = array(
    667         'activity-at-message',
    668667        'activity-comment',
    669668        'activity-comment-author',
    672671        'friends-request',
    673672        'friends-request-accepted',
    674         'groups-at-message',
    675673        'groups-details-updated',
    676674        'groups-invitation',
    726724         */
    727725        do_action( 'bp_activity_sent_reply_to_reply_email', $tokens[''], $email_subject, $email_content, $tokens[''], $tokens[''], array() );
    729     } elseif ( $email_type === 'activity-at-message' || $email_type === 'groups-at-message' ) {
    730         /**
    731          * Fires after the sending of an @mention email notification.
    732          *
    733          * @since 1.5.0
    734          * @deprecated 2.5.0 Use the filters in BP_Email.
    735          *
    736          * @param BP_Activity_Activity $activity         Activity Item object.
    737          * @param string               $email_subject    Email notification subject text.
    738          * @param string               $email_content    Email notification message text.
    739          * @param string               $content          Content of the @mention.
    740          * @param int                  $receiver_user_id The ID of the user who is receiving the update.
    741          */
    742         do_action( 'bp_activity_sent_mention_email', $tokens['activity'], $email_subject, $email_content, $tokens['content'], $tokens[''] );
    744727    } elseif ( $email_type === 'core-user-registration' ) {
Note: See TracChangeset for help on using the changeset viewer.