Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BP email templates assume that activity items have content #138

Open
boonebgorges opened this issue Feb 7, 2018 · 2 comments
Open

BP email templates assume that activity items have content #138

boonebgorges opened this issue Feb 7, 2018 · 2 comments
Assignees

Comments

@boonebgorges
Copy link
Owner

The default format for bp-ges-single emails is defined at

$html_content = __( "{{{ges.action}}}:\n\n<blockquote>{{{usermessage}}}</blockquote>\n&ndash;\n<a href=\"{{{thread.url}}}\">Go to the discussion</a> to reply or catch up on the conversation.\n{{{ges.email-setting-description}}}", 'bp-ass' );

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.

@r-a-y
Copy link
Collaborator

r-a-y commented Feb 7, 2018

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.

@boonebgorges
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants