Classes
- MediaEmbedView
- MediaFrameSelect
- MediaWidgetControl
- MediaWidgetModel
- PersistentDisplaySettingsLibrary
- Constructor
- GalleryDetailsMediaFrame
Members
-
<static> component.controlConstructors :Object.<string, wp.mediaWidgets.MediaWidgetModel>
-
Widget control (view) constructors, mapping widget id_base to subclass of MediaWidgetControl. Media widgets register themselves by assigning subclasses of MediaWidgetControl onto this object by widget ID base.
Type:
- Object.<string, wp.mediaWidgets.MediaWidgetModel>
-
<static> component.modelCollection :Backbone.Collection
-
Collection of all widget model instances.
Type:
- Backbone.Collection
-
<static> component.modelConstructors :Object.<string, wp.mediaWidgets.MediaWidgetModel>
-
Widget model constructors, mapping widget id_base to subclass of MediaWidgetModel. Media widgets register themselves by assigning subclasses of MediaWidgetControl onto this object by widget ID base.
Type:
- Object.<string, wp.mediaWidgets.MediaWidgetModel>
-
<static> component.widgetControls :Object.<string, wp.mediaWidgets.MediaWidgetControl>
-
Mapping of widget ID to instances of MediaWidgetControl subclasses.
Type:
- Object.<string, wp.mediaWidgets.MediaWidgetControl>
Methods
-
<static> component.handleWidgetAdded(event, widgetContainer)
-
Handle widget being added or initialized for the first time at the widget-added event.
Parameters:
Name Type Description eventjQuery.Event Event. widgetContainerjQuery Widget container element. Returns:
- Type
- void
-
<static> component.handleWidgetUpdated(event, widgetContainer)
-
Sync widget instance data sanitized from server back onto widget model. This gets called via the 'widget-updated' event when saving a widget from the widgets admin screen and also via the 'widget-synced' event when making a change to a widget in the customizer.
Parameters:
Name Type Description eventjQuery.Event Event. widgetContainerjQuery Widget container element. Returns:
- Type
- void
-
<static> component.init()
-
Initialize functionality. This function exists to prevent the JS file from having to boot itself. When WordPress enqueues this script, it should have an inline script attached which calls wp.mediaWidgets.init().
Returns:
- Type
- void
-
<static> component.setupAccessibleMode()
-
Setup widget in accessibility mode.
Returns:
- Type
- void