Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#23261 closed enhancement (fixed)

Add include to orderby options for get_terms()

Reported by: wpsmith's profile wpsmith Owned by: boonebgorges's profile boonebgorges
Milestone: 4.1 Priority: normal
Severity: normal Version: 3.4
Component: Taxonomy Keywords: needs-docs
Focuses: Cc:

Description

In light of WordPress 3.5 allowing WP_Query to orderby post__in (#21776, #13729), it would be awesome to have the same functionality for get_terms() and the include argument.

Likewise (#13729), term queries can specify the posts to retrieve by passing an array of term IDs to the include parameter. There is no built in method for sorting those posts by the order specified.

Attachments (2)

23261.patch (2.1 KB) - added by wpsmith 11 years ago.
First pass.
23261.r1.patch (584 bytes) - added by wpsmith 9 years ago.
Refreshed

Download all attachments as: .zip

Change History (9)

@wpsmith
11 years ago

First pass.

#1 @boonebgorges
9 years ago

  • Keywords needs-refresh needs-unit-tests added; has-patch removed

Patch looks OK at a glance, but needs a refresh, and unit tests for the new sort order.

@wpsmith
9 years ago

Refreshed

#2 @wpsmith
9 years ago

  • Keywords needs-refresh removed
  • Version set to 3.4

#3 @boonebgorges
9 years ago

  • Milestone changed from Awaiting Review to 4.1

wpsmith - Thanks for the refresh.

#4 @johnbillion
9 years ago

  • Keywords needs-unit-tests removed
  • Resolution set to fixed
  • Status changed from new to closed

r30052 missed this ticket.

This ticket was mentioned in Slack in #core by boonebgorges. View the logs.


9 years ago

#6 @DrewAPicture
9 years ago

  • Keywords needs-docs added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Please update the inline docs for the orderby argument to specify that in addition to term fields, 'include' is now accepted and what that means.

#7 @boonebgorges
9 years ago

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

In 30077:

Update inline docs for [30052].

Fixes #23261.

Note: See TracTickets for help on using tickets.