Get approved comments or comments that the author is me
Get approved comments or comments that the author is me
Get approved comments or comments that the author is me
Initially it seemed like a good idea to add comment_notification_text inside the pre_comment_on_post hook, but it didn’t go well. So I removed the pre_comment_on_post and just added to comment_notification_text a comment type check, which is related to the CPT for which the comments are. Now my code works fine for both comment categories (moderated and … Read more
Restrict users to see only own comments and the post author’s replies
By default, wp_list_comments() uses the get_avatar() function to display user avatars, which in turn retrieves the avatar URL from Gravatar. However, get_avatar() also applies the get_avatar_url filter before returning the URL, so you can modify the avatar URL for the comments by using that filter. Here’s an example of how you can modify the avatar … Read more
Add ACF Quick Edit Columns on Comments
Page to view single comment and all replies
The last comments of a post for the author of that post
The closest I could come up with is : function comment_post_check() { if ($_POST[’email’] == ‘[email protected]’) wp_die( __(‘Error: Someone from Somewhere, you are banned’) ); } add_action(‘pre_comment_on_post’, ‘comment_post_check’, 10);
It sounds like the TinyMCE editor is not properly initialized when you are replying to a comment. In order to fix this issue, you will need to add some JavaScript code to your WordPress theme that will initialize the TinyMCE editor when the comment reply form is displayed. To do this, you can use the … Read more
As you can see in the list of fields in the documentation, where author_email is listed, some fields are only available in the edit context. You can set the context by adding ?context=edit to your request but this will require the request to be authenticated. This is to ensure that personal data is not publicly … Read more