Plugin Directory

Changeset 815240


Ignore:
Timestamp:
12/05/2013 04:40:52 AM (12 years ago)
Author:
StuartSequeira
Message:

Added user-friendly error messages in comment-form.php
Moved screenshot-1.png to /assets directory, was in /trunk/assets

Location:
comment-gatekeeper
Files:
1 added
1 deleted
3 edited

Legend:

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

    r814784 r815240  
    66Author: Stuart Sequeira
    77Author URI: http://lb3computingsolutions.com/about/
    8 Version: 0.9
     8Version: 0.9.1
    99*/
    1010
  • comment-gatekeeper/trunk/includes/comment-form.php

    r814784 r815240  
    6262        if( isset($_POST['gatekey'] ) ){
    6363       
     64            if( '' == $_POST['gatekey']){
     65
     66                wp_die( __('<strong>ERROR</strong>: please enter a valid spam-filtering answer.' , 'lb3cgk' ) ); //no gatekey was entered
     67
     68            }
     69           
    6470            $gatekey = $_POST['gatekey'];
    65        
     71           
    6672        }else{
    6773       
    68             $gatekey = 'nonce_al_pass'; //no key was entered so set a fake key to fail
     74            //$gatekey = 'nonce_al_pass'; //no key was entered so set a fake key to fail
     75            wp_die( __('<strong>ERROR</strong>: please enter a valid spam-filtering answer.' , 'lb3cgk' ) );//gatekey was not set
     76           
     77        }
    6978       
    70         }
    71 
    7279        $result = ( $gatekey == $gatelock );
    7380       
    7481        if( !$result){
    7582       
    76             $_POST['comment'] = ''; //empty the post comment and let it fail
     83            //$_POST['comment'] = ''; //empty the post comment and let it fail
     84            wp_die( __('<strong>SORRY</strong>: you did not answer to gatekeeper question correctly.' , 'lb3cgk' ) );
    7785       
    7886        }
  • comment-gatekeeper/trunk/readme.txt

    r814784 r815240  
    4040== Changelog ==
    4141
     42= 0.9.1 =
     43Feature testing
     44* Added user-friendly error messages for empty answer field and for incorrect answer field
     45* keeping this as testing version; will also see if there are any other improvement ideas from users
     46* Intend to roll this out as part of 1.0 after testing
     47
    4248= 0.9 =
    4349* Initial submission to WordPress
Note: See TracChangeset for help on using the changeset viewer.