new SidebarPartial()
Partial representing a widget area.
- Since:
-
- 4.5.0
- Source:
Extends
Methods
-
ensureWidgetPlacementContainers(widgetId)
-
Make sure there is a widget instance container in this sidebar for the given widget ID.
Parameters:
Name Type Description widgetId
string - Since:
-
- 4.5.0
- Source:
Returns:
Widget instance partial. -
findDynamicSidebarBoundaryNodes()
-
Get the before/after boundary nodes for all instances of this sidebar (usually one). Note that TreeWalker is not implemented in IE8.
- Since:
-
- 4.5.0
- Source:
Returns:
- Type
- Array.<{before: Comment, after: Comment, instanceNumber: number}>
-
getWidgetIds()
-
Get the list of widget IDs associated with this widget area.
- Since:
-
- 4.5.0
- Source:
Returns:
- Type
- Array
-
handleSettingChange(newWidgetIds, oldWidgetIds)
-
Handle change to the sidebars_widgets[] setting.
Parameters:
Name Type Description newWidgetIds
Array New widget ids. oldWidgetIds
Array Old widget ids. - Since:
-
- 4.5.0
- Source:
-
initialize(id, options)
-
Constructor.
Parameters:
Name Type Description id
string Partial ID. options
Object Properties
Name Type Description params
Object - Since:
-
- 4.5.0
- Source:
-
placements()
-
Get the placements for this partial.
- Since:
-
- 4.5.0
- Source:
Returns:
- Type
- Array
-
ready()
-
Set up the partial.
- Since:
-
- 4.5.0
- Source:
-
reflowWidgets()
-
Reflow widgets in the sidebar, ensuring they have the proper position in the DOM.
- Since:
-
- 4.5.0
- Source:
Returns:
List of placements that were reflowed.- Type
- Array.<wp.customize.selectiveRefresh.Placement>
-
refresh()
-
Note that the meat is handled in handleSettingChange because it has the context of which widgets were removed.
- Since:
-
- 4.5.0
- Source: