Changeset 1495734
- Timestamp:
- 09/14/2016 12:26:13 PM (9 years ago)
- Location:
- kcaptcha/trunk
- Files:
-
- 1 added
- 2 edited
-
kcaptcha.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
-
readme.txt~ (added)
Legend:
- Unmodified
- Added
- Removed
-
kcaptcha/trunk/kcaptcha.php
r993070 r1495734 68 68 function set_setting_page() { 69 69 //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'); 71 71 } 72 72 … … 82 82 function setting_page() { 83 83 //include setting form 84 include_once dirname( __FILE__ ).' admin/setting.php';84 include_once dirname( __FILE__ ).'/admin/setting.php'; 85 85 } 86 86 … … 132 132 // Add settings link to plugins list 133 133 function 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>' ); 135 135 return $links; 136 136 } 137 137 138 $plugin = plugin_basename( __FILE__ ); 138 139 add_filter( 'plugin_action_links_'.$plugin, 'add_kcaptcha_settings_link' ); … … 154 155 if ( 1 == $login_form ) { 155 156 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 ); 157 158 } 158 159 … … 178 179 * */ 179 180 function kcaptcha_login_check($user) { 180 if (!isset($_POST)) { 181 182 if (isset($_POST['captcha_code'])) { 181 183 //Check for captcha validation 182 184 if (empty($_SESSION['captcha_code']) || strcasecmp($_SESSION['captcha_code'], $_POST['captcha_code']) != 0) { … … 193 195 add_action( 'register_form', 'kcaptcha_register_form' ); 194 196 //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); 196 198 } 197 199 … … 287 289 /* If captcha is empty */ 288 290 if (isset($_REQUEST['captcha_code']) && "" == $_REQUEST['captcha_code']) 289 wp_die(__('Please fill the form.', 'captcha'));291 wp_die(__('Please fill the CAPTCHA.', 'captcha')); 290 292 291 293 if (empty($_SESSION['captcha_code']) || strcasecmp($_SESSION['captcha_code'], $_REQUEST['captcha_code']) != 0) { -
kcaptcha/trunk/readme.txt
r1495728 r1495734 1 1 === Kcaptcha === 2 2 Contributors: ksolves 3 Tags: captcha, add captcha to a form3 Tags: wordpress-captcha-plugin,Plugin,login-captcha,form-captcha,registration-captcha,comment-captcha,anti-spam,captcha-plugin 4 4 Requires at least: 3.1 5 5 Tested up to: 4.6.1 … … 15 15 Like 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. 16 16 17 [We offer free support ](http://products.ksolves.com/kcaptcha.php .)17 [We offer free support ](http://products.ksolves.com/kcaptcha.php) 18 18 19 19 = Features =
Note: See TracChangeset
for help on using the changeset viewer.