We are trying to block some of the comments from outputting based on if the user is signed in.
We found and are using the filter "comment_text"
If the user is not signed in we output text like: "This comment is premium, please log in to see"
It works great.
The issue is the comment bubble does not use this filter and when the text is output, anyone can see it at the bottom. Is there a way to have the bubble run through this filter? Or is there a way to disable the bubble based on user role via php?
Thanks
Thanks.
We were using the comment_text to check for user signed in and what role.
We were playing around and found that the comments themselves use ajax, while the bubble seems to use the rest APi.
Through ajax we can get the current users ID, however through the Rest APi, is there a way to get the current users ID?