Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#36515 closed enhancement (fixed)

WP_Query should be able to order by specific order as "post_name__in"

Reported by: postpostmodern's profile postpostmodern Owned by: boonebgorges's profile boonebgorges
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.4
Component: Query Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

Support post_name__in as an orderby argument in WP_Query to match post__in and post_parent__in

Attachments (2)

query.diff (1.2 KB) - added by postpostmodern 8 years ago.
Patch for wp-includes/query.php
test-query.diff (1.3 KB) - added by postpostmodern 8 years ago.
Patch for tests/phpunit/tests/post/query.php

Download all attachments as: .zip

Change History (5)

@postpostmodern
8 years ago

Patch for wp-includes/query.php

@postpostmodern
8 years ago

Patch for tests/phpunit/tests/post/query.php

#1 @swissspidy
8 years ago

  • Keywords has-patch has-unit-tests added
  • Milestone changed from Awaiting Review to Future Release

#2 @boonebgorges
8 years ago

  • Milestone changed from Future Release to 4.6

@postpostmodern Thanks for the great patches!

#3 @boonebgorges
8 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 37225:

Query: Allow results to be ordered by post_parent__in.

Props postpostmodern.
Fixes #36515.

Note: See TracTickets for help on using tickets.