Class: Embed

wp.media.controller. Embed


new Embed(attributes)

wp.media.controller.Embed A state for embedding media from a URL.
Parameters:
Name Type Description
attributes object The attributes hash passed to the state.
Properties
Name Type Argument Default Description
id string <optional>
embed Unique identifier.
title string <optional>
Insert From URL Title for the state. Displays in the media menu and the frame's title region.
content string <optional>
embed Initial mode for the content region.
menu string <optional>
default Initial mode for the menu region.
toolbar string <optional>
main-embed Initial mode for the toolbar region.
menu string <optional>
false Initial mode for the menu region.
priority int <optional>
120 The priority for the state link in the media menu.
type string <optional>
link The type of embed. Currently only link is supported.
url string <optional>
The embed URL.
metadata object <optional>
{} Properties of the embed, which will override attributes.url if set.
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:

<abstract> activate()

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

constructor()

Constructor.
Since:
  • 3.5.0
Inherited From:
Source:

<abstract> deactivate()

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

<abstract> ready()

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

<abstract> reset()

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

scan()

Trigger a scan of the embedded URL's content for metadata required to embed.
Source:
Fires:
  • wp.media.controller.Embed#event:scan

scanImage(attributes)

Try scanning the embed as an image to discover its dimensions.
Parameters:
Name Type Description
attributes Object
Source: