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

是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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan