Make WordPress Core

Opened 12 years ago

Last modified 5 years ago

#20810 new enhancement

Add disable arg or attributes arg to wp_dropdown_categories() & wp_dropdown_pages()

Reported by: wpsmith's profile wpsmith Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: Posts, Post Types Keywords: has-patch needs-refresh
Focuses: template Cc:

Description

It would be beneficial to be able to add disabled="disabled" attribute to the select tag or add multiple attributes to the select tag.

Related: #20156, #20167

Attachments (4)

wp_dropdown_categories_disabled_opt.patch (1.1 KB) - added by wpsmith 12 years ago.
Disabled arg for wp_dropdown_categories()
wp_dropdown_categories_attr_opt.patch (1.2 KB) - added by wpsmith 12 years ago.
Extra attributes for wp_dropdown_categories()
wp_dropdown_pages_disabled_opt.patch (1.0 KB) - added by wpsmith 12 years ago.
Disabled arg for wp_dropdown_pages()
wp_dropdown_pages_attr_opt.patch (1.1 KB) - added by wpsmith 12 years ago.
Extra attributes for wp_dropdown_pages()

Download all attachments as: .zip

Change History (10)

@wpsmith
12 years ago

Disabled arg for wp_dropdown_categories()

@wpsmith
12 years ago

Extra attributes for wp_dropdown_categories()

@wpsmith
12 years ago

Disabled arg for wp_dropdown_pages()

@wpsmith
12 years ago

Extra attributes for wp_dropdown_pages()

#1 @prionkor
12 years ago

+1 we need it on all dropdown functions.

An array of attribute could be passed. Like:

$args = array(

'attrs' = array(

'multiple' => 'multiple',
'disable' => 'disabled'

)

)

It will allow users to add extra attribute like classes or any other html 5 attributes on the dropdown.

Last edited 12 years ago by prionkor (previous) (diff)

#2 @prionkor
12 years ago

  • Cc sisir@… added

#3 @nacin
10 years ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added

#4 @lumpysimon
9 years ago

+1 for this, I'm having to use jQuery at the moment to achieve this.

#5 @johnbillion
9 years ago

  • Keywords has-patch needs-refresh added
  • Milestone changed from Awaiting Review to Future Release
  • Version set to 2.1

Patch needs a refresh.

#6 @garrett-eclipse
8 years ago

+1
Currently utilizing jQuery or rebuilding the $output through the wp_dropdown_cats filter.

Note: See TracTickets for help on using tickets.