Class: MediaFrame

wp.media.view. MediaFrame


new MediaFrame()

wp.media.view.MediaFrame The frame used to create the media modal.
Mixes In:
Source:

Extends

Classes

AudioDetails
EditAttachments
ImageDetails
Manage
Manage
MediaDetails
Post
Select
VideoDetails

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

attach()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

close()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

createIframeStates(options)

Parameters:
Name Type Description
options Object
Source:

createMenu(menu)

This:
Parameters:
Name Type Description
menu Object
Source:

createRouter(router)

This:
Parameters:
Name Type Description
router Object
Source:

createTitle(title)

This:
Parameters:
Name Type Description
title Object
Source:

createToolbar(toolbar)

This:
Parameters:
Name Type Description
toolbar Object
Source:

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

detach()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

dispose()

Inherited From:
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

escape()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

iframeContent(content)

This:
Parameters:
Name Type Description
content Object
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

open()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

remove()

Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.View

render()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

reset()

Reset all states on the frame to their defaults.
Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Frame

setMenuTabPanelAriaAttributes()

Sets the attributes to be used on the menu ARIA tab panel.
Since:
  • 5.3.0
Source:
Returns:
Type
void

setRouterTabPanelAriaAttributes()

Sets the attributes to be used on the router ARIA tab panel.
Since:
  • 5.3.0
Source:
Returns:
Type
void

triggerModeEvents()

Map activeMode collection events to the frame.
Inherited From:
Source:

Events


{mode}:deactivate

Frame mode deactivation event.
Inherited From:
Source:

Class: MediaFrame

wp.media.view. MediaFrame


new MediaFrame()

Source:

Classes

AudioDetails
EditAttachments
ImageDetails
Manage
Manage
MediaDetails
Post
Select
VideoDetails

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

attach()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

close()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

createIframeStates(options)

Parameters:
Name Type Description
options Object
Source:

createMenu(menu)

This:
Parameters:
Name Type Description
menu Object
Source:

createRouter(router)

This:
Parameters:
Name Type Description
router Object
Source:

createTitle(title)

This:
Parameters:
Name Type Description
title Object
Source:

createToolbar(toolbar)

This:
Parameters:
Name Type Description
toolbar Object
Source:

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

detach()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

dispose()

Inherited From:
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

escape()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

iframeContent(content)

This:
Parameters:
Name Type Description
content Object
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

open()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

remove()

Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.View

render()

Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.MediaFrame

reset()

Reset all states on the frame to their defaults.
Inherited From:
Source:
Returns:
Returns itself to allow chaining.
Type
wp.media.view.Frame

setMenuTabPanelAriaAttributes()

Sets the attributes to be used on the menu ARIA tab panel.
Since:
  • 5.3.0
Source:
Returns:
Type
void

setRouterTabPanelAriaAttributes()

Sets the attributes to be used on the router ARIA tab panel.
Since:
  • 5.3.0
Source:
Returns:
Type
void

triggerModeEvents()

Map activeMode collection events to the frame.
Inherited From:
Source:

Events


{mode}:deactivate

Frame mode deactivation event.
Inherited From:
Source: