[wp-trac] [WordPress Trac] #30865: $tax_query_defaults is hardcoded with "slug" as the field in the parse_tax_query function

WordPress Trac noreply at wordpress.org
Tue Dec 30 21:30:18 UTC 2014


#30865: $tax_query_defaults is hardcoded with "slug" as the field in the
parse_tax_query function
--------------------------+----------------------
 Reporter:  jhned         |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Taxonomy      |     Version:  trunk
 Severity:  normal        |  Resolution:  wontfix
 Keywords:                |     Focuses:
--------------------------+----------------------

Comment (by boonebgorges):

 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/30865#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list