dongxianglun5163
2019-08-05 08:34
浏览 118
已采纳

是wp_nonce_field字段使用与google reCaptcha相同的保护?

i am creating an registration form on wordpress, and i am using wp_nonce_field inside my form, i am wondering if i should include the google reCaptcha or not.

<form>
<?php
if ( function_exists('wp_nonce_field') ) 
    wp_nonce_field('plugin-name-action_' . $wpn_object); 
?>
</form>
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongll0502 2019-08-05 08:56
    已采纳

    According to WP codex:

    The nonce field is used to validate that the contents of the form request came from the current site and not somewhere else.

    The nonce is basically an unique string generated for each visitor of your website. You'll use it to make sure forms are submitted on your website.

    The reCaptcha is used to make sure bots can't spam you. It uses javascript and you'll have to use google's reCaptcha library: https://www.google.com/recaptcha/intro/v3.html

    点赞 打赏 评论

相关推荐 更多相似问题