Make WordPress Core

Changeset 61447


Ignore:
Timestamp:
01/06/2026 11:56:12 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify multi-select behavior in CollectionAdd and GalleryAdd controllers.

Follow-up to [30120], [31373].

Props yogeshbhutkar, mikachan, luigipulcini, SergeyBiryukov.
Fixes #62696.

Location:
trunk/src/js/media/controllers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/controllers/collection-add.js

    r47122 r61447  
    1818 * @param {string}                     [attributes.id=library]              Unique identifier.
    1919 * @param {string}                     attributes.title                     Title for the state. Displays in the frame's title region.
    20  * @param {boolean}                    [attributes.multiple=add]            Whether multi-select is enabled. @todo 'add' doesn't seem do anything special, and gets used as a boolean.
     20 * @param {boolean|string}             [attributes.multiple=add]            Whether multi-select is enabled. Accepts 'add' or true.
     21 *                                                                          When set to true, requires Shift or Cmd/Ctrl to select multiple items.
     22 *                                                                          When set to 'add', allows selecting multiple items by clicking thumbnails.
    2123 * @param {wp.media.model.Attachments} [attributes.library]                 The attachments collection to browse.
    2224 *                                                                          If one is not supplied, a collection of attachments of the specified type will be created.
  • trunk/src/js/media/controllers/gallery-add.js

    r46800 r61447  
    2121 * @param {string}                     [attributes.id=gallery-library]      Unique identifier.
    2222 * @param {string}                     [attributes.title=Add to Gallery]    Title for the state. Displays in the frame's title region.
    23  * @param {boolean}                    [attributes.multiple=add]            Whether multi-select is enabled. @todo 'add' doesn't seem do anything special, and gets used as a boolean.
     23 * @param {boolean|string}             [attributes.multiple=add]            Whether multi-select is enabled. Accepts 'add' or true.
     24 *                                                                          When set to true, requires Shift or Cmd/Ctrl to select multiple items.
     25 *                                                                          When set to 'add', allows selecting multiple items by clicking thumbnails.
    2426 * @param {wp.media.model.Attachments} [attributes.library]                 The attachments collection to browse.
    2527 *                                                                          If one is not supplied, a collection of all images will be created.
Note: See TracChangeset for help on using the changeset viewer.