Sorry for the delay, I’ve been working on something else. I’ve come across a few things and to simplify I’ve created screenshots and descriptions to help you recreate what I’m seeing. I understand it’s the holidays, so don’t feel you need to reply quickly. Thanks again for all your help!
Environment:
WordPress version 6.4.2
Theme: Neve version 3.7.4
Zeno Report Comments version 2.0.4
Threshold: 0 (previously I had this set to 3)
Comment Threading: My theme does use threading.
Language: English
Testing Users and Browsers:
Admin: Firefox
User 1: Chrome
User 2: Edge
User 3: Opera
Step 1: User 1 reports User 2’s comment and receives the “Thanks” message. This works correctly.
Step 2: User 2 views post and their comment says, “Comment awaiting moderation.”. The total number of comments has changed from 4 to 3 even though the total shown is still 4. I’m guessing this is working as intended.
Step 3: User 3 views post and both User 2 and their own comments are hidden. Comment total shows 3 even though only 2 are showing. Should User 3’s comment be hidden since it wasn’t reported?
Step 4: Admin also doesn’t see User 2 and User 3’s comments. Comment total shows 3 even though only 2 are showing. Should the Admin see these comments?
Step 5: User 1 refreshes post and can no longer see User 2 or User 3’s comments. Comment total shows 3 even though only 2 are showing. Should User 3’s comment be hidden since it wasn’t reported?
Step 6: Admin approved comment and User 1 refreshed the post. User 1 can see that it’s now moderated. I used the code you supplied and changed the text slightly to display that it was indeed modified. However, this doesn’t display in later steps. Comment total is now showing 4 correctly. Here’s the code for reference.
function my_zeno_report_comments_already_flagged_note( $text ) {
return 'This Comment is already moderated - Modified';
}
Step 7: User 2 refreshes the post after Admin moderated the post and everything looks correct.
Step 8: User 3 refreshes the post after Admin moderated the post and “Report” link is displayed instead of moderated text that User 1 saw. This could be correct if based on user logged in and who reported the comment.
Step 9: After User 3 refreshes the post, they can click the “Report” link. When clicked, User 3 receives the already moderated text. However, it’s not the text User 1 received that I modified via the code supplied.
Step 10: When the Admin refreshes the post after they moderate it the “Report” link still appears. Should the link appear for anyone if an Admin has already moderated it?
Step 11: If the Admin then clicks the “Report” link they receive the already moderated text. However, it’s not the text User 1 received that I modified via the code supplied.
Additional Notes:
If I trash the comment (i.e. don’t approve it) it disappears from the post, as it should. However, User 3’s comment doesn’t reappear on the post. I know you said threading is hard to code for because it’s theme dependent. If this is impossible to fix, let me know and I can decide whether to disable threading. If there’s an option I’m missing, please suggest it. The only thing I can think of is to edit the comment, removing the user’s text and replacing it with something generic and then approving it.