WordPress.org

Make WordPress Core

Changes between Initial Version and Version 16 of Ticket #13729


Ignore:
Timestamp:
09/05/12 22:01:49 (20 months ago)
Author:
scribu
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13729

    • Property Status changed from new to accepted
    • Property Owner changed from ryan to jakemgold
    • Property Milestone changed from 3.1 to Future Release
    • Property Keywords 2nd-opinion has-patch added; post__in custom query orderby removed
  • Ticket #13729 – Description

    initial v16  
    1 Post queries can specify the posts to retrieve by passing an array of post IDs to the "post__in" parameter. 
     1Post queries can specify the posts to retrieve by passing an array of post IDs to the {{{post__in}}} parameter. 
    22 
    3 There is no built in method for sorting those posts by the order specified. In fact, I would argue that when using "post__in", the post query should, by ''default'', order the posts in the same order specified in that array (I think this is the expected behavior by the developer). 
     3There is no built in method for sorting those posts by the order specified. In fact, I would argue that when using {{{post__in}}}, the post query should, by ''default'', order the posts in the same order specified in that array (I think this is the expected behavior by the developer). 
    44 
    55Many custom themes allow the developer to specifically designate featured posts, controlling the order in which they appear. Many of these themes are forced to make independent queries for each post or execute an atypical loop by calling the result by ID (the post array's key). The ability to "fetch", properly order, and execute a standard loop for a specific set of posts in a specific order would reduce overhead and complexity in these situations.