[wp-trac] [WordPress Trac] #13729: Post Query should be able to order by specific order passed in "post__in"
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 8 11:42:55 UTC 2011
#13729: Post Query should be able to order by specific order passed in "post__in"
-----------------------------------+-----------------------------
Reporter: jakemgold | Owner: dd32
Type: enhancement | Status: reviewing
Priority: normal | Milestone: Future Release
Component: Query | Version: 3.0
Severity: minor | Resolution:
Keywords: 2nd-opinion has-patch |
-----------------------------------+-----------------------------
Changes (by jakemgold):
* owner: ryan => dd32
* status: reopened => reviewing
Comment:
Apologies for the inappropriate resolution... making my first core
commits.
I've modified the diff to let it fall through to the "else" (where it will
order by its default, date) if {{{ $post__in }}} is empty. Arguably a tiny
bit less efficient (since it takes the time to set the acceptable allowed
keys and does some sanitizing), but probably prudent to not have the
default {{{ orderby }}} kept in more than one or two places.
We could, alternatively, set the default {{{ orderby }}} before the if()
branch, since it's already referenced in two places.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13729#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list