We’re using the disqus plugin on our wordpress site, so anyone commenting should have a login through disqus.
Yet, I’m still seeing spammers trying to post through the regular comments API.
They’re not getting through to the post, but they’re clogging my inbox as admin.
How do I disable this API – I only want to accept comments that come from a logged in Disqus user?
There is much easier way to close standard WordPress comments. Just add
to your
functions.php
file and comments will be closed.You can try to stop it in the
pre_comment_on_post
hookI use this when I use Facebook comments instead of WordPress comments.
Here is a similar example with an anonymous function:
but I prefer the first example, it’s easier to modify.
This hook is in the file
wp-comments-post.php
as: