Home › Forums › WordPress Plugins › Digest plugin – Want contents of new posts/replies not just titles
- This topic has 1 reply, 2 voices, and was last updated 3 years, 4 months ago by vinny.
November 6, 2019 at 8:58 am #18702mike hammockParticipant
I’ve been trying to use your plugin’s hooks to achieve this goal, but with no success so far. Our customer would like the email digests to include the author’s name and content rather than just a linked title. Can you advise the best way to achieve this?
November 6, 2019 at 11:16 am #18717vinnyKeymaster
Currently the best way to do this is by hooking into the filter
bbpnns_digest_format_forum_posts, which takes 2 parameters:
- (string) $body – The body of the digest message for the current user. Needs to be returned within the filter function.
- (associative array) $forum_posts – The list of topics and replies in the user’s digest. The format is:
[$forum_id => stdClass( 'ID' => $post_id, 'post_type' => $topic_or_reply, 'user_id' => $user_id, 'notification_id' => $int, forum_id => $forum_id ) ]
You can use that data to build your digest.
I’m planning on adding summary/detailed digest options on a per-user basis in a future release, as well as the ability to override the digest templates inside your theme. However, I don’t see this happening before the end of the month due to other priorities. Also, for more complex changes you’ll still need to hook into the filter.
- You must be logged in to reply to this topic.