-
-
Makes sure there is a widget instance container in this sidebar for the given
widget ID.
Parameters:
Name |
Type |
Description |
widgetId |
string
|
The widget ID. |
- Since:
-
- Source:
-
Returns:
The widget instance partial.
-
Type
-
wp.customize.selectiveRefresh.Partial
-
-
Gets the before/after boundary nodes for all instances of this sidebar
(usually one).
Note that TreeWalker is not implemented in IE8.
- Since:
-
- Source:
-
Returns:
An array with an object for each sidebar instance, containing the
node before and after the sidebar instance and its instance number.
-
Type
-
Array:.<{before:: Comment:, after:: Comment:, instanceNumber:: number:}>
-
-
Get the list of widget IDs associated with this widget area.
- Since:
-
- Source:
-
Throws:
-
-
If there's no settingId.
-
-
Type
-
Error
-
-
If the setting doesn't exist in the API.
-
-
Type
-
Error
-
-
If the API doesn't pass an array of widget ids.
-
-
Type
-
Error
Returns:
A shallow copy of the array containing widget IDs.
-
Type
-
Array
-
handleSettingChange(newWidgetIds, oldWidgetIds)
-
Handles changes to the sidebars_widgets[] setting.
Parameters:
Name |
Type |
Description |
newWidgetIds |
Array
|
New widget IDs. |
oldWidgetIds |
Array
|
Old widget IDs. |
- Since:
-
- Source:
-
Returns:
-
Type
-
void
-
placements()
-
Gets the placements for this partial.
- Since:
-
- Source:
-
Returns:
An array containing placement objects for each of the
dynamic sidebar boundary nodes.
-
Type
-
Array
-
ready()
-
Sets up the partial.
- Since:
-
- Source:
-
Returns:
-
Type
-
void
-
-
Reflows widgets in the sidebar, ensuring they have the proper position in the
DOM.
- Since:
-
- Source:
-
Returns:
List of placements
that were reflowed.
-
Type
-
Array:.<wp.customize.selectiveRefresh.Placement:>
-
refresh()
-
Refreshes the sidebar partial.
Note that the meat is handled in handleSettingChange because it has the
context of which widgets were removed.
- Since:
-
- Source:
-
Returns:
A promise postponing the refresh.
-
Type
-
Promise