buddypress-group-email-subscription
buddypress-group-email-subscription copied to clipboard
BP email templates assume that activity items have content
The default format for bp-ges-single emails is defined at https://github.com/boonebgorges/buddypress-group-email-subscription/blob/8b2eb5a91e56d36af86847c352fb12815ea7ba8a/bp-activity-subscription-functions.php#L570
The format $action: <blockquote>$content</blockquote>
makes sense for activity items that have content/excerpts, such as blog posts/comments, forum posts, activity updates. But the format doesn't make sense for other sorts of activity, such as new group memberships.
Should we have a separate email type for content-free activity items? I know it feels like overkill, but the only alternative I can think of is to filter and modify the placeholders on the fly, which defeats the purpose of having admin-editable email types.
Good catch.
At the moment, does this mean that there's an empty <blockquote>
element in the HTML email?
If so, I would rather dynamically remove the <blockquote>
element than introduce another email post type solely for no-content items.
If you're okay with that, I'll try and get to this and write up a unit test.
It's also the colon that comes after the {{{ges:action}}}
element.
Parsing this and the blockquote out dynamically will only work if the admin hasn't modified the template. Maybe this is acceptable, but it's worth noting.