Plugin Directory

Changeset 2551113


Ignore:
Timestamp:
06/20/2021 08:07:03 PM (5 years ago)
Author:
irunstuff
Message:

add 'mailto:' check support

Location:
comment-runner/trunk
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • comment-runner/trunk/comment-runner.php

    r2534542 r2551113  
    55 * Plugin URI:        https://irunstuff.com/plugins/comment-runner
    66 * Description:       Reduce or eliminate comment spam.
    7  * Version:           1.0.0
     7 * Version:           1.1.0
    88 * Author:            IRunStuff.com
    99 * Author URI:        https://irunstuff.com
     
    4141    }
    4242
     43    // stristr = (case insensitive) find the first occurrence of a string
    4344    $has_link = stristr( $comment_content, 'https://' ) ?: stristr( $comment_content, 'http://' );
     45    $has_mailto = stristr( $comment_content, 'mailto:' );
    4446
    45     if ( $has_link && ! current_user_can('administrator') ) {
     47    if ( ( $has_link || $has_mailto ) && ! current_user_can('administrator') ) {
    4648        //return new WP_Error( 'spam', 'Comment spam (link in content) detected!' );
    4749        return 'trash';
     
    5153}
    5254
     55// name of filter to hook the callback to, the function to add(the callback),
     56// callback priority(lower #s execute earlier, # of args to pass to callback
    5357add_filter( 'pre_comment_approved' , 'irunstuff_comment_handler' , 100, 2 );
    5458
  • comment-runner/trunk/readme.txt

    r2534895 r2551113  
    2121Comment Runner checks WordPress comments for HTML hyperlinks.
    2222If one is found, the comment is placed in your comment-"trash" folder.
    23 This technique is effective because it denies spammers what they're after -- an SEO advantage through hyperlinks.
     23This technique is effective because it denies spammers what they're after -- an SEO advantage through hyperlinks and lead generation through email.
    2424
    25 Additionally, Comment Runner hides your comment's author-URL input box so if one is present in a comment, we presume it to be spam (as this would have to come from a bot) and marked as "trash."
     25Additionally, Comment Runner hides the author-URL input box.
     26And because this field isn't visible to a reader of the blog, any comment that includes data in this field is presumed to be spam and marked as "trash."
    2627
    2728= How do I contact support? =
Note: See TracChangeset for help on using the changeset viewer.