Changes between Initial Version and Version 1 of Ticket #6915, comment 3
- Timestamp:
- 02/16/2016 09:16:47 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6915, comment 3
initial v1 1 Attached patch passes the the'To' email info into the email template for checking so we can determine if the "Unsubscribe" link should show in emails.1 Attached patch passes the 'To' email info into the email template for checking so we can determine if the "Unsubscribe" link should show in emails. 2 2 3 I had to move the `'to'` parameter higher up to the `bp_get_email()` function and I had to stash the param ater in the `buddypress()` object in order so we can access this info in the email template. Yeah, I know...3 I had to move the `'to'` parameter higher up to the `bp_get_email()` function and I had to stash the parameter in the `buddypress()` object in order so we can access this info in the email template. Yeah, I know... 4 4 5 5 To determine if a user should see the "Unsubscribe" link, I created an email template function called `bp_email_is_recipient_to_singular_user()` (pardon the crappy name for now!). In this function, I'm using `bp_is_user_active()`, which I've patched to determine if a user is pending as well. 6 6 7 If we like this technique, we could move the tokens to `bp_get_email()` as wellso we could potentially do other checks in the email template.7 If we like this technique, we could also move the tokens to `bp_get_email()` so we could potentially do other checks in the email template.