ElliotSowersby / simple-cloudflare-turnstile

WordPress Plugin: Easily add Cloudflare Turnstile to all your WordPress website forms to protect them from spam!
38 stars 12 forks source link

How to insert in the third party registration page? #7

Open qinastar opened 1 year ago

qinastar commented 1 year ago

Hello dear author, my site uses a custom registration page, how do I add verify to this page and work?

frugan-dev commented 1 year ago

Same for me..

frugan-dev commented 1 year ago

I found this solution, I hope it will help you..

<?php // put this in your custom login form
if (function_exists('cfturnstile_field_login') && get_option('cfturnstile_login')) {
  if (empty(get_option('cfturnstile_tested')) || get_option('cfturnstile_tested') === 'yes') {
    cfturnstile_field_login();
  }
}
?>
<?php // put this in your custom recovery form
if (function_exists('cfturnstile_field_reset') && get_option('cfturnstile_reset')) {
  cfturnstile_field_reset();
}
?>
<?php // put this in your custom registration form
if (function_exists('cfturnstile_field_register') && get_option('cfturnstile_register')) {
  cfturnstile_field_register();
}
?>