WordPress.org

Make WordPress Core

Opened 13 months ago

Last modified 10 months ago

#20810 new enhancement

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

Reported by: wpsmith Owned by:
Priority: normal Milestone: Awaiting Review
Component: Template Version:
Severity: normal Keywords:
Cc: sisir@…

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 13 months ago.
Disabled arg for wp_dropdown_categories()
wp_dropdown_categories_attr_opt.patch (1.2 KB) - added by wpsmith 13 months ago.
Extra attributes for wp_dropdown_categories()
wp_dropdown_pages_disabled_opt.patch (1.0 KB) - added by wpsmith 13 months ago.
Disabled arg for wp_dropdown_pages()
wp_dropdown_pages_attr_opt.patch (1.1 KB) - added by wpsmith 13 months ago.
Extra attributes for wp_dropdown_pages()

Download all attachments as: .zip

Change History (6)

wpsmith13 months ago

Disabled arg for wp_dropdown_categories()

wpsmith13 months ago

Extra attributes for wp_dropdown_categories()

wpsmith13 months ago

Disabled arg for wp_dropdown_pages()

wpsmith13 months ago

Extra attributes for wp_dropdown_pages()

comment:1 prionkor10 months 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 10 months ago by prionkor (previous) (diff)

comment:2 prionkor10 months ago

  • Cc sisir@… added
Note: See TracTickets for help on using tickets.