Make WordPress Core

Opened 14 years ago

Closed 12 years ago

#23261 closed enhancement (fixed)

Add include to orderby options for get_terms()

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

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 14 years ago.
First pass.
23261.r1.patch​ (584 bytes ) - added by wpsmith 12 years ago.
Refreshed

Download all attachments as: .zip

Change History (9)

@wpsmith
14 years ago

First pass.

#1 @boonebgorges
12 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
12 years ago

Refreshed

#2 @wpsmith
12 years ago

  • Keywords needs-refresh removed
  • Version → 3.4

#3 @boonebgorges
12 years ago

  • Milestone Awaiting Review → 4.1

wpsmith - Thanks for the refresh.

#4 @johnbillion
12 years ago

  • Keywords needs-unit-tests removed
  • Resolution → fixed
  • Status new → closed

r30052 missed this ticket.

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


12 years ago

#6 @DrewAPicture
12 years ago

  • Keywords needs-docs added
  • Resolution fixed
  • Status closed → 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
12 years ago

  • Owner set to boonebgorges
  • Resolution → fixed
  • Status reopened → closed

In 30077:

Update inline docs for [30052].

Fixes #23261.

Note: See TracTickets for help on using tickets.