WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#31122 closed enhancement (invalid)

Custom orderby keys for queries

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

Description

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 7 years ago.

Download all attachments as: .zip

Change History (3)

#1 @Funkatronic
7 years ago

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

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted

Related: #31045

Note: See TracTickets for help on using tickets.