Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/03/2016 07:55:29 PM (9 years ago)
Author:
djpaul
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-notifications.php

    r10487 r10500  
    8787        bp_send_email( $email_type, $receiver_user_id, $args );
    8888    }
     89
     90    /**
     91     * Fires after the sending of an @mention email notification.
     92     *
     93     * @since 1.5.0
     94     * @since 2.5.0 $subject, $message, $content arguments unset and deprecated.
     95     *
     96     * @param BP_Activity_Activity $activity         Activity Item object.
     97     * @param string               $deprecated       Removed in 2.5; now an empty string.
     98     * @param string               $deprecated       Removed in 2.5; now an empty string.
     99     * @param string               $deprecated       Removed in 2.5; now an empty string.
     100     * @param int                  $receiver_user_id The ID of the user who is receiving the update.
     101     */
     102    do_action( 'bp_activity_sent_mention_email', $activity, '', '', '', $receiver_user_id );
    89103}
    90104
Note: See TracChangeset for help on using the changeset viewer.