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
Permissions error when I use my plugin to delete comments in the front-end
function preprocess_mycomment($commentdata) { $existing_comments = get_comments( array(‘post_id’ => 31691) ); // I run the code for one specific page only foreach ($existing_comments as $comment) { $previous_comments = $comment->comment_author_email; // email address send by the current poster if ( $previous_comments == $commentdata[‘comment_author_email’] ) { // comparing the current email address with the previous ones in database. … Read more
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
Add functionality to block comment authors in the Comment edit pag
Best method for comment section associated with different images?
Here’s the function responsible for rendering the comments quick edit form: wp_comment_reply. Looking at its code, it seems you can short-circuit it using the wp_comment_reply filter. That only lets you start from scratch though (e.g. you can’t add to the existing form). The only way around this that I can think of is some (unholy) … Read more
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