Version Description
- Now show captcha when use wp_login_form() function to create login form.
Download this release
Release Info
Developer | shamim51 |
Plugin | Advanced noCaptcha & invisible Captcha |
Version | 2.8 |
Comparing to | |
See all releases |
Code changes from version 2.7 to 2.8
- admin/anr-admin-class.php +0 -0
- advanced-nocaptcha-recaptcha.php +11 -13
- anr-captcha-class.php +14 -1
- functions.php +0 -0
- images/advanced-nocaptcha-recaptcha.jpg +0 -0
- readme.txt +6 -2
- style/style.css +0 -0
admin/anr-admin-class.php
CHANGED
File without changes
|
advanced-nocaptcha-recaptcha.php
CHANGED
@@ -3,23 +3,21 @@
|
|
3 |
Plugin Name: Advanced noCaptcha & invisible Captcha
|
4 |
Plugin URI: https://www.shamimsplugins.com/contact-us/
|
5 |
Description: Show noCaptcha or invisible captcha in Comment Form (after Comment textarea before submit button), bbPress, Login, Register, Lost Password, Reset Password. Also can implement in any other form easily.
|
6 |
-
Version: 2.
|
7 |
-
Author: Shamim
|
8 |
Author URI: https://www.shamimsplugins.com/contact-us/
|
9 |
Text Domain: advanced-nocaptcha-recaptcha
|
10 |
License: GPLv2 or later
|
11 |
*/
|
12 |
-
//DEFINE
|
13 |
-
define('ANR_PLUGIN_DIR', plugin_dir_path( __FILE__ ));
|
14 |
-
define('ANR_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
|
15 |
|
16 |
-
require_once
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
//ADD ACTIONS
|
20 |
-
|
21 |
-
add_action('after_setup_theme', 'anr_include_require_files');
|
22 |
-
add_action('plugins_loaded', 'anr_translation');
|
23 |
-
//add_action('wp_enqueue_scripts', 'anr_enqueue_scripts');
|
24 |
-
add_action('login_enqueue_scripts', 'anr_login_enqueue_scripts');
|
25 |
-
|
3 |
Plugin Name: Advanced noCaptcha & invisible Captcha
|
4 |
Plugin URI: https://www.shamimsplugins.com/contact-us/
|
5 |
Description: Show noCaptcha or invisible captcha in Comment Form (after Comment textarea before submit button), bbPress, Login, Register, Lost Password, Reset Password. Also can implement in any other form easily.
|
6 |
+
Version: 2.8
|
7 |
+
Author: Shamim Hasan
|
8 |
Author URI: https://www.shamimsplugins.com/contact-us/
|
9 |
Text Domain: advanced-nocaptcha-recaptcha
|
10 |
License: GPLv2 or later
|
11 |
*/
|
12 |
+
// DEFINE
|
13 |
+
define( 'ANR_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
14 |
+
define( 'ANR_PLUGIN_URL', plugins_url( '/', __FILE__ ) );
|
15 |
|
16 |
+
require_once 'functions.php';
|
17 |
|
18 |
+
// ADD ACTIONS
|
19 |
+
add_action( 'after_setup_theme', 'anr_include_require_files' );
|
20 |
+
add_action( 'plugins_loaded', 'anr_translation' );
|
21 |
+
// add_action( 'wp_enqueue_scripts', 'anr_enqueue_scripts' );
|
22 |
+
add_action( 'login_enqueue_scripts', 'anr_login_enqueue_scripts' );
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
anr-captcha-class.php
CHANGED
@@ -25,6 +25,7 @@ if (!class_exists('anr_captcha_class'))
|
|
25 |
|
26 |
if ( '1' == anr_get_option( 'login' ) && !defined('XMLRPC_REQUEST')) {
|
27 |
add_action ('login_form', array($this, 'login_form_field'), 99);
|
|
|
28 |
add_action ('woocommerce_login_form', array($this, 'login_form_field'), 99);
|
29 |
add_filter ('authenticate', array($this, 'login_verify'), 999, 3 );
|
30 |
|
@@ -236,7 +237,7 @@ if (!class_exists('anr_captcha_class'))
|
|
236 |
$count = absint( anr_get_option( 'failed_login_allow' ) );
|
237 |
$post_id = $this->post_id();
|
238 |
|
239 |
-
if( $count && $post_id && filter_var( $ip, FILTER_VALIDATE_IP
|
240 |
$user_logins = $wpdb->get_col( $wpdb->prepare( "SELECT meta_value FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s", $post_id, md5( $ip ) ) );
|
241 |
|
242 |
if( count( $user_logins ) < $count && count( array_unique( $user_logins ) ) <= 1 ){
|
@@ -253,6 +254,18 @@ if (!class_exists('anr_captcha_class'))
|
|
253 |
}
|
254 |
}
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
function wc_form_field()
|
257 |
{
|
258 |
|
25 |
|
26 |
if ( '1' == anr_get_option( 'login' ) && !defined('XMLRPC_REQUEST')) {
|
27 |
add_action ('login_form', array($this, 'login_form_field'), 99);
|
28 |
+
add_filter( 'login_form_middle', array( $this, 'login_form_return' ), 99 );
|
29 |
add_action ('woocommerce_login_form', array($this, 'login_form_field'), 99);
|
30 |
add_filter ('authenticate', array($this, 'login_verify'), 999, 3 );
|
31 |
|
237 |
$count = absint( anr_get_option( 'failed_login_allow' ) );
|
238 |
$post_id = $this->post_id();
|
239 |
|
240 |
+
if( $count && $post_id && filter_var( $ip, FILTER_VALIDATE_IP ) ){
|
241 |
$user_logins = $wpdb->get_col( $wpdb->prepare( "SELECT meta_value FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s", $post_id, md5( $ip ) ) );
|
242 |
|
243 |
if( count( $user_logins ) < $count && count( array_unique( $user_logins ) ) <= 1 ){
|
254 |
}
|
255 |
}
|
256 |
|
257 |
+
function login_form_return( $field = '' ) {
|
258 |
+
if ( $this->show_login_captcha() ) {
|
259 |
+
|
260 |
+
if ( is_user_logged_in() && anr_get_option( 'loggedin_hide' ) ) {
|
261 |
+
return $field;
|
262 |
+
}
|
263 |
+
|
264 |
+
$field = anr_captcha_form_field( false );
|
265 |
+
}
|
266 |
+
return $field;
|
267 |
+
}
|
268 |
+
|
269 |
function wc_form_field()
|
270 |
{
|
271 |
|
functions.php
CHANGED
File without changes
|
images/advanced-nocaptcha-recaptcha.jpg
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: shamim51
|
|
3 |
Tags: recaptcha,nocaptcha,invisible,no captcha,bot,spam,captcha,woocommerce captcha,woocommerce nocaptcha, woocommerce,widget,plugin,sidebar,shortcode,page,posts,comments,google,bbpress,multisite,multiple
|
4 |
Donate link: https://www.paypal.me/hasanshamim
|
5 |
Requires at least: 4.4
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 2.
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -81,6 +81,10 @@ To show noCaptcha use [anr_nocaptcha g-recaptcha-response]
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
84 |
= 2.7 =
|
85 |
|
86 |
* Fix: Settings page checkbox uncheck was not working.
|
3 |
Tags: recaptcha,nocaptcha,invisible,no captcha,bot,spam,captcha,woocommerce captcha,woocommerce nocaptcha, woocommerce,widget,plugin,sidebar,shortcode,page,posts,comments,google,bbpress,multisite,multiple
|
4 |
Donate link: https://www.paypal.me/hasanshamim
|
5 |
Requires at least: 4.4
|
6 |
+
Tested up to: 4.9.8
|
7 |
+
Stable tag: 2.8
|
8 |
Requires PHP: 5.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 2.8 =
|
85 |
+
|
86 |
+
* Now show captcha when use wp_login_form() function to create login form.
|
87 |
+
|
88 |
= 2.7 =
|
89 |
|
90 |
* Fix: Settings page checkbox uncheck was not working.
|
style/style.css
CHANGED
File without changes
|