Make WordPress Core

Opened 16 years ago

Closed 15 years ago

#15523 closed enhancement (duplicate)

wp_dropdown_pages() should be able to generate a multi-select

Reported by: christian_gnoth Owned by:
Priority: normal Milestone:
Component: General Version: 3.0.1
Severity: minor Keywords: close
Cc: Focuses:

Description

it would be useful if this functions offers parameters for this two options:

  • multiple="multiple"
  • size="xyz"

so that also drop down boxes with multiple select option and a bigger size can be displayed

Attachments (1)

15523.diff​ (2.3 KB ) - added by GaryJ 16 years ago.
Inclusion of multiple and size attributes on wp_dropdown_pages(). Some whitespace fixing.

Download all attachments as: .zip

Change History (10)

#1 @nacin
16 years ago

  • Milestone Awaiting Review
  • Resolution → maybelater
  • Status new → closed

Core doesn't need this, but you can re-open with a patch.

@GaryJ
16 years ago

Inclusion of multiple and size attributes on wp_dropdown_pages(). Some whitespace fixing.

#2 @GaryJ
16 years ago

  • Cc GaryJ added
  • Keywords has-patch needs-testing added; wp_dropdown_pages select tag removed
  • Resolution maybelater
  • Severity normal → minor
  • Status closed → reopened

#3 @ocean90
16 years ago

  • Milestone → Awaiting Review

#4 follow-up: @mdawaffe
16 years ago

  • Keywords needs-patch added; has-patch needs-testing removed
  • Milestone Awaiting Review → Future Release
  • Summary wp_dropdown_pages() → wp_dropdown_pages() should be able to generate a multi-select

Looks reasonable. No need to escape quotes: \". Just nest with the opposite quote style.

Should selected accept an array/csv of IDs?

PS: Can we add the args to the filter? Seems pretty useless without it.

apply_filters( 'wp_dropdown_pages', $output, $r );

#5 in reply to: ↑ 4 @GaryJ
16 years ago

I would have preferred not to escape quotes, but it does elsewhere in the function, so I was keeping with consistency.

I agree with selected now needing to accept multiple values, but I'm not sure how to amend that so it feeds nicely into the walker - some amendment of Walker_PageDropdown::start_el() checking with is_array() may well be needed.

#6 @ocean90
15 years ago

#20156 with another patch for multiple values.

Last edited 15 years ago by ocean90 (previous) (diff)

#7 @scribu
15 years ago

<select multiple> has a horrible UX. We should not encourage it's use.

#8 @scribu
15 years ago

  • Keywords close added; needs-patch removed

#9 @scribu
15 years ago

  • Milestone Future Release
  • Resolution → duplicate
  • Status reopened → closed

Going to close as duplicate of #20156, since it has more patches.

Note: See TracTickets for help on using tickets.