Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#20156 closed feature request (wontfix)

Add Multiselect Option to wp_dropdown_pages / wp_dropdown_categories

Reported by: jackreichert's profile jackreichert Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords:
Focuses: Cc:

Description

Select menus are helpful, but sometimes you want to offer the ability to select more than one option. The attached patch adds functionality to add multiple="multiple" if needed.

Attachments (2)

post-template.multiselect_dropdown_pages.patch (885 bytes) - added by jackreichert 13 years ago.
patch adds multiple="multiple" to wp_dropdown_pages()
post-template.multiselect_dropdown_categories.patch (851 bytes) - added by jackreichert 13 years ago.
Same fix for wp_dropdown_categories

Download all attachments as: .zip

Change History (19)

@jackreichert
13 years ago

patch adds multiple="multiple" to wp_dropdown_pages()

@jackreichert
13 years ago

Same fix for wp_dropdown_categories

#1 @ocean90
13 years ago

  • Keywords has-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

#2 @ocean90
13 years ago

Oh, the other patch wasn't there as I closed the ticket.

If you want you can re-open it and add wp_dropdown_categories to the title.

#3 @jackreichert
13 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from Add Multiselect Option to wp_dropdown_pages to Add Multiselect Option to wp_dropdown_pages / wp_dropdown_categories

#4 @jackreichert
13 years ago

Thanks, did that.

#5 @jackreichert
13 years ago

  • Keywords has-patch added

#6 @scribu
13 years ago

  • Keywords close added
  • Milestone set to Awaiting Review

Same comment as in the other ticket: <select multiple> has a horrible UX. We should not encourage it's use.

#7 @jackreichert
13 years ago

I agree that multiselect does not provide good UX, however there are use-cases, such as settings pages for plugins and themes. That's how I came across the issue and thought it would be worth a shot submitting the patch.

#8 follow-up: @scribu
13 years ago

Why not provide a list of checkboxes instead, since that's what we use for the category metabox, after all.

#9 in reply to: ↑ 8 @DrewAPicture
13 years ago

  • Cc xoodrew@… added

Replying to scribu:

Why not provide a list of checkboxes instead, since that's what we use for the category metabox, after all.

Agreed. If you want multiple select, why not just use the checkbox list instead?

#10 @jackreichert
13 years ago

That is what I ended up doing with the theme I was developing.

#11 follow-up: @scribu
13 years ago

So, wp_terms_checklist() covers that.

What use-cases are there to warrant a wp_pages_checklist()?

#12 @jackreichert
13 years ago

Similar to terms checklist i.e. adding specific functionality to user-specified pages. For example, a widget that isn't relevant for all pages, only some. I agree that a wp_post_checklist might be overkill.

I'd be happy to create the patch if you think it's warranted.

#13 in reply to: ↑ 11 @DrewAPicture
13 years ago

Replying to scribu:

So, wp_terms_checklist() covers that.

What use-cases are there to warrant a wp_pages_checklist()?

Any idea what function renders the Pages checklist on nav-menus.php?

#14 @scribu
13 years ago

It's probably loose code, but would be worth putting it into a function. Two birds with one stone.

#15 @scribu
13 years ago

  • Keywords has-patch close removed
  • Resolution set to wontfix
  • Status changed from reopened to closed

If someone does write a patch that implements wp_posts_checklist() and uses it in nav-menus.php, please open a new ticket.

#16 @scribu
13 years ago

  • Milestone Awaiting Review deleted

#17 @scribu
13 years ago

Follow-up: #20167

Note: See TracTickets for help on using tickets.