Replace comments with a dummy text

Yes, possible. Add this to your theme’s functions.php file- add_filter( ‘get_comment_text’, ‘replace_comment_texts’ ); function replace_comment_texts() { return “This comment is hidden”; } I have written a plugin few days back, that does the exact thing. You can try this too- https://wordpress.org/plugins/mask-comments/

comment_notification_text filter for custom post type

Using comment_notification_text you will get comment notification text and comment ID. To check the post type you need to get the post associated with comment and then you can check for post type Example (Read the inline comments): function custom_notificaion($notify_message, $comment_id) { $comment_obj = get_comment($comment_id); //Get comment object $comment_post = get_post($comment_obj->comment_post_ID); //Get post object //Check … Read more

Safe to remove this: when using a 3rd Party Comment App? [closed]

From the Disqus plugin core: // Only replace comments if the disqus_forum_url option is set. add_filter(‘comments_template’, ‘dsq_comments_template’); Which certainly implies that Disqus uses the <?php comments_template(); ?> include to include it’s own files, so I would advise leaving it where it is 🙂

Custom Comment Notifications Fire on each Page Load

well, single.php is the template that’s loaded whenever you visit a page. And since you call comment_notification() there it’s only logical that a notification is sent. You should remove that code from single.php. Hooking into comment_post should be enough.

Anonymize comments after one year

I don’t have a ready to use solution. Howeder I think is not to heavy to build a custom plugin, that do that. Update the comment data, use wp_update_comment(). For anonymize the IP you can use wp_privacy_anonymize_ip() (currently not in core, open as ticket). Use the wp cron to run this after 6 months and … Read more

Internal post link creates comments on its own

This kind of automatic comments are called “trackbacks” and “pingbacks”. They are a blogging feature that consists of automatically notifying blogs that are linked to from an article when said article is published. This notification appears as a kind of comment on the mentionned article, with a link pointing back to the newly published one. … Read more

Only allow the post author and admin to comment on a post

Depending on how your theme is set up, comments_open might be the filter you want. (in functions.php) add_filter( ‘comments_open’, ‘block_comments_for_others’, 10, 2 ); function block_comments_for_others( $is_open, $post_id ) { $is_open = false; $post_author_id = get_post_field( ‘post_author’, $post_id ); if ( get_current_user_id() == $post_author_id || current_user_can(‘administrator’) ) $is_open = true; return $is_open; } Or possibly something … Read more