buddypress-group-email-subscription icon indicating copy to clipboard operation
buddypress-group-email-subscription copied to clipboard

Allow plugins to override default digest markup

Open boonebgorges opened this issue 7 years ago • 1 comments

It's not currently possible to override the basic logic that BPGES uses to build digest HTML. There are no filters, except on single pieces of markup, and the way ass_digest_fire() is constructed mixes together business and display logic.

This should be improved, so that the function basically has three parts (which may be broken into separate functions):

  1. The digest queue is pulled up and sorted
  2. For each user who is to receive a digest, the HTML is built from the raw list of groups/activity_ids.
  3. BPGES uses the HTML to send the digests

The function should be rewritten so that 2 can easily be done elsewhere.

boonebgorges avatar Nov 13 '17 19:11 boonebgorges

A note that the existing ass_digest_format_item_group and ass_digest_format_item filters can be leveraged for some of this work. But ass_digest_format_item_group doesn't receive enough information to be properly modified - it needs at least a list of activity ids.

boonebgorges avatar Nov 13 '17 19:11 boonebgorges