Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#28688 closed enhancement (fixed)

wp_get_object_terms - orderby

Reported by: chrico's profile ChriCo Owned by: boonebgorges's profile boonebgorges
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

actually its only possible to sort the object_term-list by following args:

  • term_id
  • slug
  • name
  • term_group
  • term_order
  • count
  • none

It would be helpful to add the following missing fields to orderby:

  • parent
  • taxonomy
  • term_taxonomy_id

Attachments (1)

28688.patch (891 bytes) - added by ChriCo 10 years ago.
Added missing args to orderby

Download all attachments as: .zip

Change History (8)

@ChriCo
10 years ago

Added missing args to orderby

#1 @bordoni
10 years ago

On lines 2023 and 2024 I think that the standards for WordPress is } else {.

#2 @SergeyBiryukov
10 years ago

  • Keywords has-patch added

#3 @boonebgorges
10 years ago

  • Keywords needs-unit-tests added

#4 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 4.2

#5 @boonebgorges
10 years ago

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

In 31236:

Additional 'orderby' values for wp_get_object_terms().

Adds support for ordering by 'taxonomy', 'term_taxonomy_id', and 'parent'.

Props ChriCo.
Fixes #28688.

#6 @boonebgorges
10 years ago

In 31237:

Add @since annotation for 'orderby' values introduced in [31236].

See #28688.

#7 @DrewAPicture
10 years ago

In 31238:

Minor fix for inline doc syntax in a changelog entry for wp_get_object_terms().

See #28688.

Note: See TracTickets for help on using tickets.