Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Clarify multi-select behavior in collection and gallery add controllers #8012

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/js/media/controllers/collection-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ var Selection = wp.media.model.Selection,
* @param {object} [attributes] The attributes hash passed to the state.
* @param {string} [attributes.id=library] Unique identifier.
* @param {string} attributes.title Title for the state. Displays in the frame's title region.
* @param {boolean} [attributes.multiple=add] Whether multi-select is enabled. @todo 'add' doesn't seem do anything special, and gets used as a boolean.
* @param {boolean|string} [attributes.multiple=add] Whether multi-select is enabled. Accepts 'add' or true.
* When set to true, requires SHIFT/CMD/CTRL to select multiple items.
* When set to 'add', allows selecting multiple items by clicking thumbnails.
* @param {wp.media.model.Attachments} [attributes.library] The attachments collection to browse.
* If one is not supplied, a collection of attachments of the specified type will be created.
* @param {boolean|string} [attributes.filterable=uploaded] Whether the library is filterable, and if so what filters should be shown.
Expand Down
4 changes: 3 additions & 1 deletion src/js/media/controllers/gallery-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ var Selection = wp.media.model.Selection,
* @param {Object} [attributes] The attributes hash passed to the state.
* @param {string} [attributes.id=gallery-library] Unique identifier.
* @param {string} [attributes.title=Add to Gallery] Title for the state. Displays in the frame's title region.
* @param {boolean} [attributes.multiple=add] Whether multi-select is enabled. @todo 'add' doesn't seem do anything special, and gets used as a boolean.
* @param {boolean|string} [attributes.multiple=add] Whether multi-select is enabled. Accepts 'add' or true.
* When set to true, requires SHIFT/CMD/CTRL to select multiple items.
* When set to 'add', allows selecting multiple items by clicking thumbnails.
* @param {wp.media.model.Attachments} [attributes.library] The attachments collection to browse.
* If one is not supplied, a collection of all images will be created.
* @param {boolean|string} [attributes.filterable=uploaded] Whether the library is filterable, and if so what filters should be shown.
Expand Down
Loading