Add a total count for read Receipts in Announcements


Home Forums Front End PM PRO Add a total count for read Receipts in Announcements

This topic is: Resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44524
    luke.adams
    Participant

    Morning Shamim,

    Is it possible to display a total read receipt count for announcements which display after the names and times.

    Please see below for an example:

    Message
    ——————————————————————-
    Read by User 1 @ 10 May 2022 9:14 am
    Read by User 2 @ 10 May 2022 9:17 am
    Read by User 3 @ 10 May 2022 9:37 am
    Read by User 4 @ 10 May 2022 9:41 am
    ——————————————————————–
    Number of Readers: 4

    #44537
    Shamim Hasan
    Keymaster

    Yes, possible. add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_filter_read_receipt', function( $text, $receipt ){
        $text .= sprintf( '<div>Number of Readers: %d</div>', count( $receipt ) );
        return $text;
    }, 10, 2);
    
    #44715
    luke.adams
    Participant

    Thank you this works perfectly

Viewing 3 posts - 1 through 3 (of 3 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.