Mark Comments With Long URLs as SPAM
If you want to mark comments containing URLs longer than 50 chars as SPAM, use the snippet below:
function snippet_url_spamcheck( $approved , $commentdata ) {
return ( strlen( $commentdata['comment_author_url'] ) > 50 ) ? 'spam' : $approved;
}
add_filter( 'pre_comment_approved', 'snippet_url_spamcheck', 99, 2 );