WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 6 years ago

#18754 closed enhancement (fixed)

Add taxonomy argument to get_terms_orderby filter

Reported by: johnbillion Owned by: nacin
Milestone: 3.7 Priority: normal
Severity: normal Version: 3.3
Component: Taxonomy Keywords: has-patch
Focuses: Cc:
PR Number:

Description

The get_terms_orderby filter in get_terms() doesn't get passed the taxonomies parameter.

If a plugin wants to use the taxonomies parameter when filtering the terms order, it must also filter get_terms_args and add the taxonomies argument to the $args array, so it can subsequently use it in the get_terms_orderby filter.

Attachments (2)

18754.patch (462 bytes) - added by johnbillion 8 years ago.
18754.diff (1.1 KB) - added by johnbillion 6 years ago.

Download all attachments as: .zip

Change History (10)

@johnbillion
8 years ago

#1 @johnbillion
8 years ago

  • Keywords has-patch added

Patch

#2 @wonderboymusic
6 years ago

  • Milestone changed from Awaiting Review to 3.7

Easy fix, patch still applies

#3 @desrosj
6 years ago

Patch works for me too.

@johnbillion
6 years ago

#4 @johnbillion
6 years ago

18754.diff is a refresh, plus it passes $taxonomies to the other filters used in get_terms() (props nacin for pointing those out).

#5 @nacin
6 years ago

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

In 25142:

Pass $taxonomies to the get_terms_orderby filter.

props johnbillion.
fixes #18754.

#6 @johnbillion
6 years ago

Not going to use the latter patch that passes $taxonomies to the other filters too?

#7 @nacin
6 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Ah, didn't see it.

list_terms_exclusions is a weird filter. Does this affect any of the issues covered in #21267? Don't think so, but want to check.

#8 @nacin
6 years ago

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

In 25576:

Pass $taxonomies to two more filters in get_terms().

props johnbillion.
fixes #18754.

Note: See TracTickets for help on using tickets.