[wp-trac] [WordPress Trac] #14448: get_terms(): Add "slugs" option for $fields
WordPress Trac
wp-trac at lists.automattic.com
Wed Jul 28 23:21:48 UTC 2010
#14448: get_terms(): Add "slugs" option for $fields
-------------------------+--------------------------------------------------
Reporter: wjm | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.0
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
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
)
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14448>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list