Changeset 2090511
- Timestamp:
- 05/18/2019 03:04:04 PM (7 years ago)
- Location:
- question-antispam-for-comment-and-signup/trunk
- Files:
-
- 2 edited
-
question-antispam-for-comment-and-signup.php (modified) (5 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
question-antispam-for-comment-and-signup/trunk/question-antispam-for-comment-and-signup.php
r2080057 r2090511 6 6 Author: Dinar Qurbanov 7 7 Author URI: http://qdb.wp.kukmara-rayon.ru/ 8 Version: 0.1. 48 Version: 0.1.5 9 9 10 10 I have used WordPress Hashcash code, also I have looked at buhsl-Captcha, Cookies for Comments, Peter's Custom Anti-Spam codes, to learn and use their codes, and also copied something from them … … 48 48 49 49 /** 50 * Install WP Hashcash50 * Install Question Antispam for Comment and Signup 51 51 */ 52 52 … … 321 321 322 322 323 /** 324 * Hook into the comment form 325 */ 323 326 324 327 … … 387 390 } 388 391 } else { 389 add_filter('pre_comment_approved', create_function('', 'return 1;')); 392 // add_filter('pre_comment_approved', create_function('', 'return 1;')); 393 add_filter( 394 'pre_comment_approved', 395 function($approved,$commentdata){ 396 if($approved===0){ 397 if( 1==get_option( 'comment_moderation' ) || 1==get_option( 'comment_whitelist' ) ){ 398 return 0; 399 } 400 return 1; 401 } 402 return $approved; 403 }, 404 199, 405 2 406 ); 390 407 if($options['count']=='on'){ 391 408 $options['comments-ham'] = ((int) $options['comments-ham']) + 1; … … 402 419 403 420 421 /** 422 * Hook into the registration form 423 */ 404 424 405 425 // https://codex.wordpress.org/Customizing_the_Registration_Form -
question-antispam-for-comment-and-signup/trunk/readme.txt
r2080057 r2090511 106 106 just to write "Tested up to: 4.8" 107 107 108 0.1.4 108 2019-05-03 109 version 0.1.4 109 110 added forgotten mb_strtlower and trim 110 111 112 2019-05-18 113 version 0.1.5 114 start to take in account "Comment must be manually approved" and "Comment author must have a previously approved comment" settings. 115 116 117 118 119
Note: See TracChangeset
for help on using the changeset viewer.