[wp-trac] [WordPress Trac] #47642: Order by comment count - posts list tables
WordPress Trac
noreply at wordpress.org
Sat Sep 19 21:48:04 UTC 2020
#47642: Order by comment count - posts list tables
-------------------------------------------------+-------------------------
Reporter: alektabor | Owner:
| johnbillion
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.6
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: has-screenshots has-patch needs- | Focuses:
unit-tests | administration
-------------------------------------------------+-------------------------
Changes (by johnbillion):
* keywords: has-screenshots has-patch needs-testing => has-screenshots
has-patch needs-unit-tests
Comment:
Thanks for the patch @ramon-fincken . I think this adjustment needs to be
made at a lower level, inside the `WP_Query` class. That way, any code
that's ordering posts by comment count will have the order corrected, not
just queries for that screen in the admin area.
[attachment:"47642.diff"] makes that change.
I'm working on some tests for this now.
In addition, this problem affects more than just the `comment_count`
ordering, the main one being ordering by date. Let's tackle this first,
then look at dates in a separate ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47642#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list