doulan6150 2010-05-03 21:10
浏览 40
已采纳

是否可以注册用户并使用Wordpress一个表单提交评论?

Is it possible to do both registering for an account and submit a comment at the same time? I want the user to be able to do this all on one page to ecourage the registration rather than be discouraged about typing something, not realizing they had to be registered and thus having to leave the page.

I think that this could be done by adding register user action to the submit comment action, but not sure how to do it with the prebuilt wordpress add_action or do_action functions. Has anyone tried this, or know of any plug-ins that do this already? I searched but couldn't find anything helpful.

Thanks.

  • 写回答

2条回答 默认 最新

  • doucheng1063 2010-05-04 20:27
    关注

    It's surely possible.

    You must first familiarize yourself with the API.

    Create your user using the WP_CREATE_USER function:

    http://codex.wordpress.org/Function_Reference/wp_create_user

    It will return the USER ID upon successful registration, then you will want to use the WP_INSERT_COMMENT function to add a comment to a post.

    http://codex.wordpress.org/Function_Reference/wp_insert_comment

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据