Without comments, a website is as effective at creating a community as the Chicago Cubs are at winning World Series titles. WordPress 4.4 is a rebuilding release and the comments system is much improved under the hood.
This release lays the groundwork for future features and improvements.
A New Classy and Strong Comment Object
The new WP_Comment class provides a single organized comment object that models its row in $wpdb->comments. You may be familiar with this approach from WP_Post, which inspired the caching implementation used in WP_Comment.
This was a prerequisite to many of the other comment-related bugbug 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 features added in 4.4. The WP_Comment class is marked final to retain flexibility while it is young.
See #32619.
Comment Queries for the Whole Family
WP_Comment_Query has new query parameters for traversing your comments family tree.
parent__intakes an array of comment parent IDs to return all matching children.parent__not_intakes an array of comment parent IDs and does not return any matching children.hierarchicalcan be set to eitherthreaded,flat, orfalse.threadedreturns a tree for matched comments, with the children for each comment included in itschildrenproperty.flatreturns a flat array of matched comments plus their children.falsedoes not include descendants for matched comments. This is the default behavior.
orderbyhas a new optioncomment__in, useful when querying bycomment__inthe matched results will return in the same order.