[wp-trac] [WordPress Trac] #11398: new sort method for query_posts (order by last comment date)
WordPress Trac
noreply at wordpress.org
Thu Aug 8 01:43:33 UTC 2013
#11398: new sort method for query_posts (order by last comment date)
-------------------------+-------------------
Reporter: erden.ozkan | Owner: ryan
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: Query | Version: 2.9
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-------------------
Changes (by wonderboymusic):
* keywords: needs-patch gsoc => has-patch
* milestone: Future Release => 3.7
Comment:
Gonna move this into 3.7 for review. It's actually a pretty easy patch.
[attachment:11398.diff 11398.diff] adds `comment_date` as an allowed key
for `orderby`:
`$posts = get_posts( array( 'fields' => 'ids', 'orderby' => 'comment_date'
) );`
The big issue is that it requires a `JOIN` of posts and comments which
won't work if the tables are partitioned or something. This could be an
option for the user, but maybe something that core never uses.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11398#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list