Wordpress/tests
Sergey Biryukov cb38bc973e Comments: Assign the array of comment data returned from the `comments_pre_query` filter to the `comments` property of the current `WP_Comment_Query` instance.
This avoids the performance overhead of calling `WP_Comment_Query::get_comments()` twice: first when creating the object instance, then to retrieve the filtered results.

This also makes the filter a bit more consistent with other similar filters, e.g. `posts_pre_query`, `terms_pre_query`, or `users_pre_query`.

Follow-up to [46086].

Props dinhtungdu, imath, spacedmonkey, adamsilverstein, SergeyBiryukov.
Fixes #50521.

git-svn-id: https://develop.svn.wordpress.org/trunk@48990 602fd350-edb4-49c9-b593-d223f7449a82
2020-09-17 19:53:47 +00:00
..
e2e Editor: update JavaScript packages 2020-06-26 13:31:11 +00:00
gutenberg Block Editor: Add a script to run Gutenberg end 2 end tests on Core. 2020-07-07 16:06:43 +00:00
phpunit Comments: Assign the array of comment data returned from the `comments_pre_query` filter to the `comments` property of the current `WP_Comment_Query` instance. 2020-09-17 19:53:47 +00:00
qunit Build/Test Tools: Restore the `QUnit` global in JSHint config for QUnit. 2020-09-15 10:07:29 +00:00