WordPress - Function to delete comments if url present?

I have my wordpress comments section set up so that there is no input box for the commenter's website.

So I know, for sure, that if there is a value for 'url' in a comment - it's spam, some bot or something.

Is there a way to add something (to functions.php perhaps?) that will delete or otherwise ignore comments if they contain a value for 'url'?

I realize this will not get rid of someone putting a url in the main body of the comment. That's ok. I just know it's a bot though if there is a url value, so those can be gotten rid of without any human review.

Thanks for any thoughts on how to do this,

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
Go to Settings | Discussion and look for comment moderation.  There, you just set WordPress to hold a comment in the queue if it has one or more links.

It would be better to use Akismet, which is far more effective than doing what are trying to do.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.