Make WordPress Core

Opened 14 years ago

Closed 10 years ago

#16625 closed enhancement (fixed)

wp_dropdown_categories reqs (consistent) option_none_value

Reported by: rcain's profile rcain Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.0 Priority: normal
Severity: minor Version: 3.0.4
Component: Taxonomy Keywords: has-patch
Focuses: template Cc:

Description

wp_dropdown_categories sets option_none value="-1" without any means to override, whereas other similar funcs (eg:wp_dropdown_pages) use options_none value= and also provide method to override default (option_none_value).

please could we have a consistent set of values (and options interface) to all thee dropdown funcs and save us some unnecessary and messy extra coding. thanks.

Attachments (1)

16625.diff (3.3 KB) - added by solarissmoke 14 years ago.

Download all attachments as: .zip

Change History (11)

@solarissmoke
14 years ago

#1 @solarissmoke
14 years ago

  • Keywords has-patch added; needs-patch removed

Actually it is only wp_dropdown_pages that has an option_none_value. The other two don't. Here's a patch. It also tidies up some of the code.

#2 @linuxologos
14 years ago

  • Cc linuxologos@… added

#3 follow-up: @rcain
14 years ago

  • Owner set to rcain
  • Status changed from new to reviewing

blimey, that was quick. very many thanks solarissmoke.

you are right of course, wp_dropdown_pages is the odd one out - not wp_drop_down_categories or wp_dropdown_users - my apologies. i suppose this means we are stuck with a legacy inconsistency here, but this patch will help.

can i ask - when do patches get rolled up into core version?

#4 in reply to: ↑ 3 @solarissmoke
14 years ago

  • Owner rcain deleted

Replying to rcain:

can i ask - when do patches get rolled up into core version?

Once the senior developers have reviewed the ticket and approved the proposed changes.

PS ownership is generally assigned to/by the senior devs in charge of that component - not to the reporter.

#5 @rcain
14 years ago

Thanks for the info solarissmoke - good to know.

PS. sorry about ownership change - was accidental.

#6 @dd32
14 years ago

  • Component changed from Canonical to Template

#7 @nacin
11 years ago

  • Component changed from Template to Taxonomy
  • Focuses template added

#8 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from reviewing to closed

In 28564:

wp_dropdown_pages() allows option_none_value to be passed. Add that arg to the $defaults for wp_dropdown_users() and wp_dropdown_categories() as well.

Props solarissmoke.
Fixes #16625.

#9 @DrewAPicture
10 years ago

  • Milestone changed from Awaiting Review to 4.0
  • Resolution fixed deleted
  • Status changed from closed to reopened

[28564] missed updating the inline docs for wp_dropdown_users|categories().

#10 @DrewAPicture
10 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 28570:

Add inline documentation for the option_none_value argument added to wp_dropdown_users|categories() in [28564].

Fixes #16625.

Note: See TracTickets for help on using tickets.