Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#31122 closed enhancement (invalid)

Custom orderby keys for queries

Reported by: funkatronic's profile Funkatronic Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Query Keywords:
Focuses: Cc:


This proposed enhancement allows for custom keys for the orderby argument in WP_Query and the accompanying mySQL clauses. This involves 2 new filters in the WP_Query method parse_orderby: allowed_orderby_keys, which allows the addition of new orderby keys other than the defaults and parse_orderby, which allows a user to create mySQL code for both new and current orderby keys.

Attachments (1)

query.php.patch (1.6 KB) - added by Funkatronic 9 years ago.

Download all attachments as: .zip

Change History (3)

#1 @Funkatronic
9 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted

Related: #31045

Note: See TracTickets for help on using tickets.