开发者 | aviarts |
---|---|
更新时间 | 2014年5月13日 05:14 |
捐献地址: | 去捐款 |
PHP版本: | 3.5.1 及以上 |
WordPress版本: | 3.8.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
wp-inline-comment-errors
to the /wp-content/plugins/
directoryNo. The out of the box install should automatically display a list any comment form error messages in the post or page with the form.
Yes. The plug-in is very customizable. You can use plug-in functions to modify just about any aspect of the display of errors. Note that you will need to at least be familiar with coding cascading style sheets to make changes to the 'out of the box' error display. If you want to customize beyond that you will need to be familiar with PHP and basic WordPress programing concepts. Please review the extensive plug-in documentation at the plug-in page.
Yes. You will need to add some code to your functions.php in order to set new wording for the message. Furture version of the plug-in will allow you to set the message wording in the plug-in settings page.
No. This is a purely PHP based solution that prints errors back into the page or post that someone is trying to post a comment to. While Javascript AJAX solutions offer a convenient user experience, it is possible for a user to turn off Javascript which will affect the way your web site displays comment form error messages.
PHP sessions are an idiomatic way to pass data between two different scripts. The plug-in uses a session variable to pass error information and HTTP POST data from the comment form back to the page or post that the user was commenting on. Normally a user submits the comment form which passes data to the WordPress wp-comments-post.php script. If there is an error the wp-comments-post.php script terminates and displays errors using WordPress's default error display, which is an unformatted page. The plug-in improves upon this behavior this by storing the error data and form POST data in a session variable, redirecting the user back to the page or post and printing POST data back into the form and printing the error information where you specify.
In the rare case where a user has their web browser set up to block all cookies and your server is set up to handle sessions with cookies only (ie sessions are disabled), then the plug-in will fall back to displaying error messages in an error message template. You can provide your own customized template so the error messages appear in a page formatted like your web site. If you do not provide a template then the plug-in will use the WordPress default error display to show any error messages. Review the documentation for tips on how to create an error message template.
The plug-in settings page provides information about your PHP sessions settings and will advise you as to whether you should set up a error template or not.