Changeset 842232
- Timestamp:
- 01/21/2014 03:10:10 AM (12 years ago)
- Location:
- comment-gatekeeper
- Files:
-
- 13 added
- 4 edited
-
tags/1.1 (added)
-
tags/1.1/comment-gatekeeper.php (added)
-
tags/1.1/includes (added)
-
tags/1.1/includes/comment-form.php (added)
-
tags/1.1/includes/settings.php (added)
-
tags/1.1/lang (added)
-
tags/1.1/lang/comment-gatekeeper - Copy.mo (added)
-
tags/1.1/lang/comment-gatekeeper-es_ES.mo (added)
-
tags/1.1/lang/comment-gatekeeper.pot (added)
-
tags/1.1/readme.txt (added)
-
tags/1.1/uninstall.php (added)
-
trunk/comment-gatekeeper.php (modified) (2 diffs)
-
trunk/includes/comment-form.php (modified) (4 diffs)
-
trunk/includes/settings.php (modified) (1 diff)
-
trunk/lang/comment-gatekeeper - Copy.mo (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/uninstall.php (added)
Legend:
- Unmodified
- Added
- Removed
-
comment-gatekeeper/trunk/comment-gatekeeper.php
r821475 r842232 6 6 Author: Stuart Sequeira 7 7 Author URI: http://lb3computingsolutions.com/about/ 8 Version: 1. 08 Version: 1.1 9 9 Text Domain: comment-gatekeeper 10 10 */ 11 12 define('LB3CGK_VERSION', '1.1'); 11 13 12 14 /*---------- … … 29 31 } 30 32 31 define('LB3CGK_VERSION', '1.0'); 33 32 34 33 35 -
comment-gatekeeper/trunk/includes/comment-form.php
r818398 r842232 50 50 51 51 function lb3cgk_gatekey_gatelock_test( $comment_post_id ){ 52 53 // get current spam block count 54 $lb3cgk_data = get_option( 'lb3cgk_data' ); 52 55 56 if( !isset( $lb3cgk_data['spam-count'] ) ){ 57 58 $lb3cgk_data['spam-count'] = 0; 59 60 } 61 53 62 $result = TRUE; 63 64 65 // check comment form value against correct answer 54 66 55 67 if( apply_filters( 'lb3cgk_add_gatekeeper_filter' , $result , $comment_post_id ) ){ … … 64 76 if( '' == $_POST['gatekey']){ 65 77 78 // increment spam blocked count and update option 79 $lb3cgk_data['spam-count']++; 80 update_option( 'lb3cgk_data' , $lb3cgk_data ); 81 66 82 wp_die( __('<strong>ERROR</strong>: please enter a valid spam-filtering answer.' , 'comment-gatekeeper' ) ); //no gatekey was entered 67 83 … … 72 88 }else{ 73 89 74 //$gatekey = 'nonce_al_pass'; //no key was entered so set a fake key to fail 90 // increment spam blocked count and update option 91 $lb3cgk_data['spam-count']++; 92 update_option( 'lb3cgk_data' , $lb3cgk_data ); 93 75 94 wp_die( __('<strong>ERROR</strong>: please enter a valid spam-filtering answer.' , 'comment-gatekeeper' ) );//gatekey was not set 76 95 … … 81 100 if( !$result){ 82 101 83 //$_POST['comment'] = ''; //empty the post comment and let it fail 102 // increment spam blocked count and update option 103 $lb3cgk_data['spam-count']++; 104 update_option( 'lb3cgk_data' , $lb3cgk_data ); 105 84 106 wp_die( __('<strong>SORRY</strong>: you did not answer to gatekeeper question correctly.' , 'comment-gatekeeper' ) ); 85 107 -
comment-gatekeeper/trunk/includes/settings.php
r818409 r842232 89 89 90 90 function lb3cgk_settings_section_output(){ 91 92 // get current spam block count 93 $lb3cgk_data = get_option( 'lb3cgk_data' ); 94 95 if( !isset( $lb3cgk_data['spam-count'] ) ){ 91 96 92 echo __("Please complete these site-wide comment gatekeeper settings" , 'comment-gatekeeper' ); 97 $lb3cgk_data['spam-count'] = 0; 98 99 } 100 101 echo __("Please complete these site-wide comment gatekeeper settings" , 'comment-gatekeeper' ) 102 . '<br />' 103 . __("Sor far, this plugin has blocked ") 104 . number_format( $lb3cgk_data['spam-count'] ) 105 . __( " spam comments for you." ); 93 106 94 107 } // end lb3cgk_settings_section_output -
comment-gatekeeper/trunk/readme.txt
r821475 r842232 5 5 Requires at least: 3.0.3 6 6 Tested up to: 3.8 7 Stable tag: 1. 07 Stable tag: 1.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 43 43 == Changelog == 44 44 45 = 1.1 = 46 Add successfully blocked spam comment counter 47 Add uninstall function to remove options on uninstall 48 45 49 = 1.0 = 46 50 Add Spanish translation
Note: See TracChangeset
for help on using the changeset viewer.