Shop Forums WordPress Plugins Digest plugin – Want contents of new posts/replies not just titles

Viewing 1 reply thread
  • Author
    Posts
    • #18702
      mike hammock
      Participant

      Hello,

      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?

    • #18717
      vinny
      Keymaster

      Hi Mike,

      Currently the best way to do this is by hooking into the filter bbpnns_digest_format_forum_posts, which takes 2 parameters:

      1. (string) $body – The body of the digest message for the current user. Needs to be returned within the filter function.
      2. (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.

      Cheers,
      Vinny

Viewing 1 reply thread
  • You must be logged in to reply to this topic.