Namespace: widgetsPreview

wp.customize. widgetsPreview

Handles the initialization, refreshing and rendering of widget partials and sidebar widgets.
Since:
  • 4.5.0
Source:

Classes

SidebarPartial
WidgetPartial

Methods


<static> self.buildWidgetSelectors()

Calculates the selector for the sidebar's widgets based on the registered sidebar's info.
Since:
  • 3.9.0
Source:
Returns:
Type
void

<static> self.getWidgetSettingId(widgetId)

Converts a widget ID into a Customizer setting ID.
Parameters:
Name Type Description
widgetId string The widget ID.
Since:
  • 4.5.0
Source:
Returns:
The setting ID.
Type
string

<static> self.highlightControls()

Shows a title and highlights widgets on hover. On shift+clicking focuses the widget control.
Since:
  • 3.9.0
Source:
Returns:
Type
void

<static> self.highlightWidget(widgetId)

Highlights the widget on widget updates or widget control mouse overs.
Parameters:
Name Type Description
widgetId string ID of the widget.
Since:
  • 3.9.0
Source:
Returns:
Type
void

<static> self.init()

Initializes the widgets preview.
Since:
  • 4.5.0
Source:
Returns:
Type
void

<static> self.parseWidgetId(widgetId)

Parses a widget ID.
Parameters:
Name Type Description
widgetId string The widget ID.
Since:
  • 4.5.0
Source:
Returns:
An object containing the idBase and number of the parsed widget ID.
Type
Object

<static> self.parseWidgetSettingId(settingId)

Parses a widget setting ID.
Parameters:
Name Type Description
settingId string Widget setting ID.
Since:
  • 4.5.0
Source:
Returns:
Either an object containing the idBase and number of the parsed widget setting ID, or null.
Type
Object | null