Plugin doesn’t work in a custom login form
-
Hey, just to double-check everything looks good. we’d like to add the captcha for our own custom login form:
<?php wp_login_form(); echo apply_filters('gglcptch_display_recaptcha', '', 'my_custom_form');
And I’ve put the below hooks and getting the You have entered an incorrect reCAPTCHA value. error.
add_filter('gglcptch_add_custom_form', function ($forms) { $forms['my_custom_form'] = array("form_name" => "Custom Form Name"); return $forms; }); add_action('wp_login', function ($user_login, $user) { $check_result = apply_filters( 'gglcptch_verify_recaptcha', true, 'string', 'my_custom_form' ); echo '<pre>'.print_r($user_login, 1).'</pre>'; echo '<pre>'.print_r($user, 1).'</pre>'; if (true === $check_result) { echo 'OK'; } else { echo $check_result; } exit; }, 99, 2);
I also used the
wp
orinit
action to make sure about the priority level.Any idea?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Plugin doesn’t work in a custom login form’ is closed to new replies.