Opened 16 years ago
Closed 13 years ago
#14448 closed enhancement (duplicate)
get_terms(): Add "slugs" option for $fields
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.0 |
| Component: | Taxonomy | Keywords: | has-patch |
| Focuses: | Cc: |
Description
This patch allows get_terms to return an array of term slugs (same as for "names" but with slugs).
Usage:
print_r( get_terms( 'event', array( 'fields'=>'slugs', 'hide_empty'=>0, ) ) );
will return
Array
(
[0] => concerts
[1] => talks
[2] => training
[3] => workshops
)
Attachments (2)
Change History (7)
Note: See
TracTickets for help on using
tickets.
This enhancement is related to #15835 [18603] and should be added for consistency.