[wp-trac] [WordPress Trac] #30306: wp_dropdown_categories values as slug
WordPress Trac
noreply at wordpress.org
Tue Dec 30 21:30:19 UTC 2014
#30306: wp_dropdown_categories values as slug
------------------------------------+---------------------------
Reporter: gputignano | Owner: boonebgorges
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.2
Component: Taxonomy | Version: 4.0
Severity: normal | Resolution: fixed
Keywords: has-patch dev-feedback | Focuses:
------------------------------------+---------------------------
Changes (by boonebgorges):
* owner: => boonebgorges
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"31006"]:
{{{
#!CommitTicketReference repository="" revision="31006"
In `wp_dropdown_categories()`, allow the term field used to populate
option valuesto be specified.
The new 'value_field' parameter makes it possible to set term slugs (or
some
other term property) as the 'value' attribute of the option elements
generated
by `wp_dropdown_categories()`. This additional flexibility reduces the
effort
required to translate term_id to other term fields when processing form
submissions that include values from taxonomy dropdowns. See #30865 for a
use case.
Props collinsinternet.
Fixes #30306.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30306#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list