Opened 11 years ago
Closed 10 years ago
#30082 closed enhancement (fixed)
Add "class" argument to "wp_dropdown_pages()"
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.3 | Priority: | normal |
| Severity: | normal | Version: | 2.1 |
| Component: | Posts, Post Types | Keywords: | has-patch |
| Focuses: | administration, template | Cc: |
Description
I've created a plugin that is using wp_dropdown_pages() function to show a <select> box with all the site pages.
The next step was to create a sidebar widget with a few <select> box's and a page dropdown. Now, in order to give my widget a smote WordPress style i use class="widefat". But wp_dropdown_pages() don't accept "class" argument, so my widget have a few full-wide select boxes and one regular select box.
I would like to be able to add classes to wp_dropdown_pages(). By the way, wp_dropdown_categories() and wp_dropdown_users() both accept "class" argument.
This is a simple fix. I'm attaching a patch.
Attachments (2)
Change History (9)
#4
@
11 years ago
Along these lines, is it possible to also add an anchor argument in the array, to append an anchor tag to the end of the values?
#5
@
10 years ago
What's holding this up being included in the next update?
I've just had to re-edit my existing code (I've already applied this patch once).
Updated patch to coding standards and to make code more readable.