Class: EditImage

wp.media.controller. EditImage


new EditImage(attributes)

wp.media.controller.EditImage A state for editing (cropping, etc.) an image.
Parameters:
Name Type Description
attributes object The attributes hash passed to the state.
Properties
Name Type Argument Default Description
model wp.media.model.Attachment The attachment.
id string <optional>
edit-image Unique identifier.
title string <optional>
Edit Image Title for the state. Displays in the media menu and the frame's title region.
content string <optional>
edit-image Initial mode for the content region.
toolbar string <optional>
edit-image Initial mode for the toolbar region.
menu string <optional>
false Initial mode for the menu region.
url string <optional>
Unused. @todo Consider removal.
Source:

Extends

Methods


<private> [undefined]()

Inherited From:
Source:

<private> _deactivate()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _menu()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _postActivate()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _preActivate()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _ready()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _renderMenu(view)

Create a view in the media menu for the state.
Parameters:
Name Type Description
view media.view.Menu The menu view.
Since:
  • 3.5.0
Inherited From:
Source:

<private> _renderTitle()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _router()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _title()

Since:
  • 3.5.0
Inherited From:
Source:

<private> _updateMenu()

Since:
  • 3.5.0
Inherited From:
Source:

activate()

Activates a frame for editing a featured image.
Since:
  • 3.9.0
Overrides:
Source:
Returns:
Type
void

constructor()

Constructor.
Since:
  • 3.5.0
Inherited From:
Source:

deactivate()

Deactivates a frame for editing a featured image.
Since:
  • 3.9.0
Overrides:
Source:
Returns:
Type
void

<abstract> ready()

Ready event callback.
Since:
  • 3.5.0
Inherited From:
Source:

<abstract> reset()

Reset event callback.
Since:
  • 3.5.0
Inherited From:
Source:

toolbar()

Adds a toolbar with a back button. When the back button is pressed it checks whether there is a previous state. In case there is a previous state it sets that previous state otherwise it closes the frame.
Since:
  • 3.9.0
Source:
Returns:
Type
void