Class: SiteIconCropper

wp.media.controller. SiteIconCropper


new SiteIconCropper()

wp.media.controller.SiteIconCropper A state for cropping a Site Icon.
Source:

Extends

Methods


<private> [undefined]()

Inherited From:
Overrides:
Source:

<private> _deactivate()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

<private> _menu()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

<private> _postActivate()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

<private> _preActivate()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

<private> _ready()

Since:
  • 3.5.0
Inherited From:
Overrides:
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:
Overrides:
Source:

<private> _renderTitle()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

<private> _router()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

<private> _title()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

<private> _updateMenu()

Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

activate()

Shows the crop image window when called from the Add new image button.
Since:
  • 4.2.0
Inherited From:
Overrides:
Source:
Returns:
Type
void

constructor()

Constructor.
Since:
  • 3.5.0
Inherited From:
Overrides:
Source:

createCropContent()

Creates the crop image window. Initialized when clicking on the Select and Crop button.
Since:
  • 4.2.0
Inherited From:
Overrides:
Source:
Fires:
  • event:crop window
Returns:
Type
void

createCropToolbar()

Checks if cropping can be skipped and creates crop toolbar accordingly.
Since:
  • 4.2.0
Inherited From:
Source:
Returns:
Type
void

deactivate()

Changes the state of the toolbar window to browse mode.
Since:
  • 4.2.0
Inherited From:
Overrides:
Source:
Returns:
Type
void

doCrop()

Creates an object with the image attachment and crop properties.
Since:
  • 4.2.0
Inherited From:
Overrides:
Source:
Returns:
A jQuery promise with the custom header crop details.
Type
$.promise

<abstract> ready()

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

removeCropper()

Removes the image selection and closes the cropping window.
Since:
  • 4.2.0
Inherited From:
Source:
Returns:
Type
void

<abstract> reset()

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