WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17587 closed feature request (wontfix)

Support hierarchical slugs in get_term_by and get_terms

Reported by: karevn Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Add a support for hierarchical slugs to get_term_by and get_terms or add get_term_by_slug function from the file attached.

Attachments (1)

get_term_by_slug.patch (1.1 KB) - added by karevn 3 years ago.

Download all attachments as: .zip

Change History (3)

karevn3 years ago

comment:1 scribu3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

That's a pretty inneficient way to do it and I don't really see the need for it either, since we already have get_term_by().

comment:2 scribu3 years ago

A more efficient way to do it would be to get all the relevant terms at once, and then check their ancestry.

Last edited 3 years ago by scribu (previous) (diff)
Note: See TracTickets for help on using tickets.