Class: Select

wp.media.view.MediaFrame. Select


new Select()

wp.media.view.MediaFrame.Select A frame for selecting an item or items from the media library.
Mixes In:
Source:

Extends

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:
Overrides:
Source:

_createStates()

Create the frame's states.
Inherited From:
Overrides:
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:
Overrides:
Source:
Returns:
Returns itself to allow chaining.
Type
this

attach()

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

bindHandlers()

Bind region mode event callbacks.
Source:
See:
  • media.controller.Region.render

browseContent(contentRegion)

Render callback for the content region in the `browse` mode.
Parameters:
Name Type Description
contentRegion wp.media.controller.Region
Source:

browseRouter(routerView)

Render callback for the router region in the `browse` mode.
Parameters:
Name Type Description
routerView wp.media.view.Router
Source:

close()

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

createIframeStates(options)

Parameters:
Name Type Description
options Object
Inherited From:
Source:

createMenu(menu)

This:
Parameters:
Name Type Description
menu Object
Inherited From:
Source:

createRouter(router)

This:
Parameters:
Name Type Description
router Object
Inherited From:
Source:

createSelection()

Attach a selection collection to the frame. A selection is a collection of attachments used for a specific purpose by a media frame. e.g. Selecting an attachment (or many) to insert into post content.
Source:
See:
  • media.model.Selection

createSelectToolbar(toolbar [, options])

Toolbars
This:
Parameters:
Name Type Argument Default Description
toolbar Object
options Object <optional>
{}
Source:

createStates()

Create the default states on the frame.
Source:

createTitle(title)

This:
Parameters:
Name Type Description
title Object
Inherited From:
Source:

createToolbar(toolbar)

This:
Parameters:
Name Type Description
toolbar Object
Inherited From:
Source:

deactivateMode(string)

Deactivate a mode on the frame.
Parameters:
Name Type Description
string mode Mode ID.
Inherited From:
Overrides:
Source:
Returns:
Returns itself to allow chaining.
Type
this

detach()

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

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

escape()

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

iframeContent(content)

This:
Parameters:
Name Type Description
content Object
Inherited From:
Source:

isModeActive(string)

Check if a mode is enabled on the frame.
Parameters:
Name Type Description
string mode Mode ID.
Inherited From:
Overrides:
Source:
Returns:
bool

open()

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

remove()

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

render()

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

reset()

Reset all states on the frame to their defaults.
Inherited From:
Overrides:
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
Inherited From:
Source:
Returns:
Type
void

setRouterTabPanelAriaAttributes()

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

triggerModeEvents()

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

uploadContent()

Render callback for the content region in the `upload` mode.
Source:

Events


{mode}:deactivate

Frame mode deactivation event.
Inherited From:
Overrides:
Source: