[wordpress插件] Comment Form Inline Errors评论表单内联错误

wordpress 插件 文章 2020-03-28 13:30 565 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

This plugin takes care of WordPress inner comments error handling, and shows comment errors above the form, instead of using the weird grey page with single line error description.

此插件负责WordPress内部注释错误处理,并在表单上方显示注释错误,而不是使用带有单行错误描述的怪异灰色页面。

All this out-of-the-box.

所有这些开箱即用

It also remembers what you've typed in. So for example, if you fill in the comment form, and send it and forget required field, it will show the error above the form, and

它还会记住您输入的内容。例如,如果您填写评论表格,然后发送并忘记必填字段,它将在表格上方显示错误,并且

prefills the form with values you've submitted so you don't have to retype them again (which is annoying).

用您已经提交的值预填充表单,因此您不必再次键入它们(这很烦人)。

By default, the plugin prints the error in this markup:

默认情况下,插件会在此标记中显示错误:

    

  
    

--error-here--

-这里有错误-

So it should be quite easy for you to style it in your css file with ".formError" or "#formError", you know the drill :).

因此,使用“。formError” “#formError” 在css文件中设置样式应该非常容易,您知道该钻头:)。

The default red colour is there just in case you won’t be able to style and since it’s error, red seems appropriate.

红色是默认颜色,以防万一您无法设置样式,并且由于错误,红色似乎很合适。

By the way, if you've customised your comment form with new fields, and you're using the preprocess_comment hook, with the correct WordPress way of handeling errors

顺便说一句,,如果您已经使用新字段自定义了注释表单,并且正在使用 preprocess_comment 钩子以及正确的WordPress处理错误的方式

, which is using wp_die on error encounter, this plugin will play nicely with that, and display your error messsage above the form as well.

,它在遇到错误时使用 wp_die ,此插件可以很好地发挥作用,并在表格上方显示错误消息。

安装步骤

    1. Go to your admin area and select Plugins -> Add new from the menu.
    2. 转到您的管理区域,然后从菜单中选择插件->添加新内容。

    3. Search for “Comment Form Inline Errors”.
    4. 搜索“注释表单内联错误”。

    5. Click install.
    6. 单击安装。

    7. Click activate.
    8. 单击激活。

下载地址
https://downloads.wordpress.org/plugin/comment-form-inline-errors.1.0.2.zip
-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Analytics Tracking分析跟踪
[wordpress插件] Ajax Cart AutoUpdate for WooCommerce适用于WooCommerce的Ajax购物车自动更新
[wordpress插件] Auto Expire Posts自动过期帖子
[wordpress插件] Expand SEO扩展SEO
[wordpress插件] Automatic Schema自动模式
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 9568
问题? 9048
如何快速搭建抽奖助手小程序(无需代码知识) 6177
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 7472
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 6793
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 6128
如何解决渲染层网络错误Failed to load media? 17394
小程序找号找回 释放昵称? 3253
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 3109
删除部分微信用户个人数据的通知,怎么删除? 6381