Plugin Directory

Changeset 1495734


Ignore:
Timestamp:
09/14/2016 12:26:13 PM (9 years ago)
Author:
ksolves
Message:

Bug fixes and edited readme

Location:
kcaptcha/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • kcaptcha/trunk/kcaptcha.php

    r993070 r1495734  
    6868function set_setting_page() {
    6969    //Add options page for setting of this plugin, this page will visible on admin section
    70     add_options_page('Kcaptcha', 'Kcaptcha', 'manage_options', __FILE__, 'setting_page');
     70    add_options_page('Kcaptcha', 'Kcaptcha', 'manage_options',__FILE__, 'setting_page');
    7171}
    7272
     
    8282function setting_page() {
    8383    //include setting form
    84     include_once dirname( __FILE__ ).'admin/setting.php';
     84    include_once dirname( __FILE__ ).'/admin/setting.php';
    8585}
    8686
     
    132132// Add settings link to plugins list
    133133function add_kcaptcha_settings_link( $links ) {
    134     array_unshift( $links, '<a href="options-general.php?page=Kcaptcha/Kcaptcha.php">Settings</a>' );
     134    array_unshift( $links, '<a href="options-general.php?page='.__FILE__.'">Settings</a>' );
    135135    return $links;
    136136}
     137
    137138$plugin = plugin_basename( __FILE__ );
    138139add_filter( 'plugin_action_links_'.$plugin, 'add_kcaptcha_settings_link' );
     
    154155if ( 1 == $login_form ) {
    155156    add_action( 'login_form', 'kcaptcha_login_form' );
    156     add_filter( 'authenticate', 'kcaptcha_login_check', 21, 1 );   
     157    add_action( 'authenticate', 'kcaptcha_login_check', 21, 1 );   
    157158}
    158159
     
    178179 * */
    179180function kcaptcha_login_check($user) {
    180     if (!isset($_POST)) {
     181
     182    if (isset($_POST['captcha_code'])) {
    181183        //Check for captcha validation
    182184        if (empty($_SESSION['captcha_code']) || strcasecmp($_SESSION['captcha_code'], $_POST['captcha_code']) != 0) {
     
    193195    add_action( 'register_form', 'kcaptcha_register_form' );
    194196        //Adding registration_errors filter to the myplugin_check_fields function
    195         add_filter('registration_errors', 'kcaptcha_register_validate', 10, 3);
     197    add_filter('registration_errors', 'kcaptcha_register_validate', 10, 3);
    196198}
    197199
     
    287289    /* If captcha is empty */
    288290    if (isset($_REQUEST['captcha_code']) && "" == $_REQUEST['captcha_code'])
    289         wp_die(__('Please fill the form.', 'captcha'));
     291        wp_die(__('Please fill the CAPTCHA.', 'captcha'));
    290292
    291293    if (empty($_SESSION['captcha_code']) || strcasecmp($_SESSION['captcha_code'], $_REQUEST['captcha_code']) != 0) {
  • kcaptcha/trunk/readme.txt

    r1495728 r1495734  
    11=== Kcaptcha ===
    22Contributors: ksolves
    3 Tags: captcha, add captcha to a form
     3Tags: wordpress-captcha-plugin,Plugin,login-captcha,form-captcha,registration-captcha,comment-captcha,anti-spam,captcha-plugin
    44Requires at least: 3.1
    55Tested up to: 4.6.1
     
    1515Like WordPress, Kcaptcha is, and always will be free. We'll continue supporting and developing it for many years to come. It'll only get better from here. If you are facing any issue or challenges please contact us and help us making it better and rich in features.
    1616
    17 [We offer free support ](http://products.ksolves.com/kcaptcha.php.)
     17[We offer free support ](http://products.ksolves.com/kcaptcha.php)
    1818
    1919= Features =
Note: See TracChangeset for help on using the changeset viewer.