WordPress 4.5 includes several ancient bug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes and a few enhancements in the Comments component. We have closed 25 tickets. Check out the full list of changes.
Moderate Comment Screen Refresh
This often neglected screen has received a UX User experience update. Don’t know what the “Moderate Comment” screen is? This is where you land when clicking one of the moderation actions from a comment notification email message.
Changes of note:
- Comment content is formatted for display, instead of one massive block Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. of escaped text
- Include navigation via a text link to the Edit Comment screen at the bottom of the comment
- Updated message styles that match other screens
- Only wrap the comment date in a link if the comment permalink exists to avoid confusion
#wpbody-content to the comment email message links for accessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility)
Max Lengths for Comment Form Fields
Be verbose without having to worry that your insightful words will be lost.
The comment form will now enforce the maximum length of each field’s respective database column with hardcoded
maxlength attributes. The hardcoded
maxlength attributes can be adjusted for custom database schemas by using the
comment_form_default_fields filter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output..
The default length settings are as follows:
- Comment: 65525 characters
- Name : 245 characters
- Email: 100 characters
- Url: 200 characters
Comments will also have the input lengths checked by the new function
wp_get_comment_fields_max_lengths(), and accompanying filter
wp_get_comment_fields_max_lengths, upon submission returning a
WP_Error object if any value is longer than its database column.
Comment Error Page Navigation
Previously, visitors who submitted a comment that was unable to be processed were shown an error message without a method to navigate back to their comment. Your potential commenter would have to use their browser’s back button to get back to their comment to resolve the error.
A simple back link has been added to the bottom of the error message page. See the screenshots below.
Other Changes of Note
rel=nofollow attribute and value pair will no longer be added to relative or same domain links within
comment_content. See #11360.
WP_Comment_Query now supports the
author_url parameter. See #36224.
- The new
pre_wp_update_comment_count_now filter allows you to bail out of updating the comment count for a given Post. See #35060