Make WordPress Core

Changes between Initial Version and Version 10 of Ticket #16734


Ignore:
Timestamp:
05/27/2014 02:40:46 AM (10 years ago)
Author:
wonderboymusic
Comment:

16734.diff adds 'multiple' => false to the default args for wp_dropdown_(categories|pages|users)().

No instances in core use this, but it will allow users to have multiple-select for whatever their little hearts desire.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16734

    • Property Component changed from General to Taxonomy
    • Property Summary changed from Allowing multiple selection when using wp_dropdown_categories to Allowing multiple selection when using wp_dropdown_* functions
    • Property Milestone changed from Awaiting Review to 4.0
  • Ticket #16734 – Description

    initial v10  
    11I would like to be able to pass an argument to wp_dropdown_categories() to allow the user to select more than one category using a CTRL-CLICK. I can use a preg_replace to add the multiple tag to the html select tag, but I cannot pass multiple selections in the "selected" argument.
    2 
    3 I modified two files (wp-includes/category-template.php and wp-admin/css/wp-admin.css) to add this option and will include patches for these files. It adds a boolean argument for "multiple" to wp_dropdown_categories and uses in_array to check if terms are listed in an array in the "selected" argument, casting it as an array if it is not. I have tested this patch to work in the latest trunk (3.1).
    4 
    5 The change in the w-admin.css is so the multiple selection box is tall enough to show the slider and more than one category.