Changeset 2551113
- Timestamp:
- 06/20/2021 08:07:03 PM (5 years ago)
- Location:
- comment-runner/trunk
- Files:
-
- 2 added
- 2 edited
-
comment-runner.php (modified) (3 diffs)
-
css/index.php (added)
-
index.php (added)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
comment-runner/trunk/comment-runner.php
r2534542 r2551113 5 5 * Plugin URI: https://irunstuff.com/plugins/comment-runner 6 6 * Description: Reduce or eliminate comment spam. 7 * Version: 1. 0.07 * Version: 1.1.0 8 8 * Author: IRunStuff.com 9 9 * Author URI: https://irunstuff.com … … 41 41 } 42 42 43 // stristr = (case insensitive) find the first occurrence of a string 43 44 $has_link = stristr( $comment_content, 'https://' ) ?: stristr( $comment_content, 'http://' ); 45 $has_mailto = stristr( $comment_content, 'mailto:' ); 44 46 45 if ( $has_link&& ! current_user_can('administrator') ) {47 if ( ( $has_link || $has_mailto ) && ! current_user_can('administrator') ) { 46 48 //return new WP_Error( 'spam', 'Comment spam (link in content) detected!' ); 47 49 return 'trash'; … … 51 53 } 52 54 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 53 57 add_filter( 'pre_comment_approved' , 'irunstuff_comment_handler' , 100, 2 ); 54 58 -
comment-runner/trunk/readme.txt
r2534895 r2551113 21 21 Comment Runner checks WordPress comments for HTML hyperlinks. 22 22 If 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 .23 This technique is effective because it denies spammers what they're after -- an SEO advantage through hyperlinks and lead generation through email. 24 24 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." 25 Additionally, Comment Runner hides the author-URL input box. 26 And 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." 26 27 27 28 = How do I contact support? =
Note: See TracChangeset
for help on using the changeset viewer.