Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #6915, comment 3


Ignore:
Timestamp:
02/16/2016 09:16:47 PM (10 years ago)
Author:
r-a-y
Comment:

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.
     1Attached patch passes the 'To' email info into the email template for checking so we can determine if the "Unsubscribe" link should show in emails.
    22
    3 I had to move the `'to'` parameter higher up to the `bp_get_email()` function and I had to stash the paramater in the `buddypress()` object in order so we can access this info in the email template.  Yeah, I know...
     3I 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...
    44
    55To 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.
    66
    7 If we like this technique, we could move the tokens to `bp_get_email()` as well so we could potentially do other checks in the email template.
     7If 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.