new EditAttachments()
wp.media.view.MediaFrame.EditAttachments
A frame for editing the details of a specific media item.
Opens in a modal by default.
Requires an attachment model to be passed in the options hash under `model`.
- Mixes In:
- Source:
Extends
- wp.media.view.Frame
- wp.media.View
- wp.Backbone.View
- Backbone.View
Methods
-
_createModes()
-
A frame can be in a mode or multiple modes at one time. For example, the manage media frame can be in the `Bulk Select` or `Edit` mode.
- Inherited From:
- Source:
-
_createStates()
-
Create the frame's states.
- Inherited From:
- Source:
- See:
Fires:
- wp.media.controller.State#event:ready
-
activateMode(string)
-
Activate a mode on the frame.
Parameters:
Name Type Description string
mode Mode ID. - Inherited From:
- Source:
Returns:
Returns itself to allow chaining.- Type
- this
-
createStates()
-
Add the default states to the frame.
-
deactivateMode(string)
-
Deactivate a mode on the frame.
Parameters:
Name Type Description string
mode Mode ID. - Inherited From:
- Source:
Returns:
Returns itself to allow chaining.- Type
- this
-
dispose()
-
- Inherited From:
- Overrides:
- Source:
- To Do:
-
- The internal comment mentions this might have been a stop-gap before Backbone 0.9.8 came out. Figure out if Backbone core takes care of this in Backbone.View now.
Returns:
Returns itself to allow chaining.- Type
- wp.media.View
-
editImageMode(contentRegion)
-
Render the EditImage view into the frame's content region.
Parameters:
Name Type Description contentRegion
Object Basic object with a `view` property, which should be set with the proper region view. -
editMetadataMode(contentRegion)
-
Content region rendering callback for the `edit-metadata` mode.
Parameters:
Name Type Description contentRegion
Object Basic object with a `view` property, which should be set with the proper region view. -
focusNavButton(which)
-
Set focus to the navigation buttons depending on the browsing direction.
Parameters:
Name Type Description which
string A CSS selector to target the button to focus. - Since:
-
- 5.3.0
- Source:
-
isModeActive(string)
-
Check if a mode is enabled on the frame.
Parameters:
Name Type Description string
mode Mode ID. - Inherited From:
- Source:
Returns:
bool -
keyEvent()
-
Respond to the keyboard events: right arrow, left arrow, except when focus is in a textarea or input field.
-
nextMediaItem()
-
Click handler to switch to the next media item.
-
previousMediaItem()
-
Click handler to switch to the previous media item.
-
remove()
-
- Inherited From:
- Overrides:
- Source:
Returns:
Returns itself to allow chaining.- Type
- wp.media.View
-
rerender()
-
Rerender the view.
-
reset()
-
Reset all states on the frame to their defaults.
- Inherited From:
- Source:
Returns:
Returns itself to allow chaining.- Type
- wp.media.view.Frame
-
triggerModeEvents()
-
Map activeMode collection events to the frame.
- Inherited From:
- Source:
Events
-
{mode}:deactivate
-
Frame mode deactivation event.
- Inherited From:
- Source: