Class: OuterSection

wp.customize. OuterSection


new OuterSection()

Class wp.customize.OuterSection. Creates section outside of the sidebar, there is no ui to trigger collapse/expand so it would require custom handling.
Since:
  • 4.9.0
Source:
Returns:
Type
void

Extends

Methods


<private> _animateChangeExpanded(completeCallback)

Animate container state change if transitions are supported by the browser.
Parameters:
Name Type Description
completeCallback function Function to be called after transition is completed.
Since:
  • 4.7.0
Inherited From:
Source:
Returns:
Type
void

_children(parentType, childType)

Get the child models associated with this parent, sorting them by their priority Value.
Parameters:
Name Type Description
parentType String
childType String
Since:
  • 4.1.0
Inherited From:
Source:
Returns:
Type
Array

_toggleActive(active [, params])

Parameters:
Name Type Argument Description
active Boolean
params Object <optional>
Since:
  • 4.1.0
Inherited From:
Source:
Returns:
False if state already applied.
Type
Boolean

_toggleExpanded(expanded [, params])

Handle the toggle logic for expand/collapse.
Parameters:
Name Type Argument Description
expanded Boolean The new state to apply.
params Object <optional>
Object containing options for expand/collapse.
Properties
Name Type Argument Description
completeCallback function <optional>
Function to call when expansion/collapse is complete.
Inherited From:
Source:
Returns:
False if state already applied or active state is false.
Type
Boolean

activate( [params])

Parameters:
Name Type Argument Description
params Object <optional>
Inherited From:
Source:
Returns:
False if already active.
Type
Boolean

attachEvents()

Add behaviors for the accordion section.
Since:
  • 4.1.0
Inherited From:
Source:

collapse( [params])

Parameters:
Name Type Argument Description
params Object <optional>
Inherited From:
Source:
Returns:
False if already collapsed.
Type
Boolean

controls()

Get the controls that are associated with this section, sorted by their priority Value.
Since:
  • 4.1.0
Inherited From:
Source:
Returns:
Type
Array

deactivate( [params])

Parameters:
Name Type Argument Description
params Object <optional>
Inherited From:
Source:
Returns:
False if already inactive.
Type
Boolean

embed()

Embed the container in the DOM when any parent panel is ready.
Since:
  • 4.1.0
Inherited From:
Source:

expand( [params])

Parameters:
Name Type Argument Description
params Object <optional>
Inherited From:
Source:
Returns:
False if already expanded or if inactive.
Type
Boolean

getContainer()

Return the container html, generated from its JS template, if it exists.
Since:
  • 4.3.0
Inherited From:
Source:

getContent()

Find content element which is displayed when the section is expanded. After a construct is initialized, the return value will be available via the `contentContainer` property. By default the element will be related it to the parent container with `aria-owns` and detached. Custom panels and sections (such as the `NewMenuSection`) that do not have a sliding pane should just return the content element without needing to add the `aria-owns` element or detach it from the container. Such non-sliding pane custom sections also need to override the `onChangeExpanded` method to handle animating the panel/section into and out of view.
Since:
  • 4.7.0
Inherited From:
Source:
Returns:
Detached content element.
Type
jQuery

getNotificationsContainerElement()

Get the element that will contain the notifications.
Since:
  • 4.9.0
Inherited From:
Source:
Returns:
Notification container element.
Type
jQuery

isContextuallyActive()

Return whether this section has any active controls.
Since:
  • 4.1.0
Inherited From:
Source:
Returns:
Type
Boolean

onChangeActive(active [, args])

Active state change handler. Shows the container if it is active, hides it if not. To override by subclass, update the container's UI to reflect the provided active state.
Parameters:
Name Type Argument Description
active boolean The active state to transiution to.
args Object <optional>
Args.
Properties
Name Type Argument Description
duration Object <optional>
The duration for the slideUp/slideDown animation.
unchanged boolean <optional>
Whether the state is already known to not be changed, and so short-circuit with calling completeCallback early.
completeCallback function <optional>
Function to call when the slideUp/slideDown has completed.
Since:
  • 4.1.0
Inherited From:
Source:

onChangeExpanded(expanded [, args])

Overrides api.Section.prototype.onChangeExpanded to prevent collapse/expand effect on other sections and panels.
Parameters:
Name Type Argument Description
expanded Boolean The expanded state to transition to.
args Object <optional>
Args.
Properties
Name Type Argument Description
unchanged boolean <optional>
Whether the state is already known to not be changed, and so short-circuit with calling completeCallback early.
completeCallback function <optional>
Function to call when the slideUp/slideDown has completed.
duration Object <optional>
The duration for the animation.
Since:
  • 4.9.0
Overrides:
Source:

<abstract> ready()

Since:
  • 4.1.0
Inherited From:
Source:

setupNotifications()

Set up notifications.
Since:
  • 4.9.0
Inherited From:
Source:
Returns:
Type
void