WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 6 months ago

#33585 new enhancement

Improve wp_list_categories to support multiple taxonomies

Reported by: bordoni Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 2.3
Component: Taxonomy Keywords: needs-patch
Focuses: Cc:

Description

Hi folks, I was working on a plugin feature request and from what I see it's not possible to pass an array on the taxonomy param from wp_list_categories, which prevents multiple taxonomies to be fetched at once.

I wanted to know if I can work on this "enhancement" for version 4.4, should be an easy modification since get_terms is an easy replacement for get_categories.

Change History (4)

#1 @bordoni
5 years ago

  • Keywords needs-patch added
  • Summary changed from Improve wp_list_categories to support multiple Categories to Improve wp_list_categories to support multiple taxonomies

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


6 months ago

#3 @talldanwp
6 months ago

  • Version changed from 4.4 to 2.1

Hi @bordoni, thanks for creating the ticket and apologies it took such a long time to receive a response.

The ticket was discussed in a triage meeting in slack (viewing the conversation will require a Making WordPress slack account - https://wordpress.slack.com/archives/C02RQBWTW/p1591247379036400).

There were a few points noted in the meeting:

  • A way forward might be to introduce a new wp_list_terms function for listing terms generically. wp_list_categories could then be re-written to use wp_list_terms.
  • The current_category param was changed in 4.4 to accept an array, so there is some precedent for this kind of change.
  • Unit tests should be added for this change.

#4 @SergeyBiryukov
6 months ago

  • Milestone set to Awaiting Review
  • Version changed from 2.1 to 2.3

wp_list_categories() was indeed added in WordPress 2.1, but taxonomies were only introduced in 2.3, adjusting the version accordingly.

Note: See TracTickets for help on using tickets.