Class: NavMenuInstancePartial

wp.customize.navMenusPreview. NavMenuInstancePartial


Partial representing an invocation of wp_nav_menu().
Since:
  • 4.5.0
Source:

Extends

Methods


initialize(id, options)

Constructor.
Parameters:
Name Type Description
id string Partial ID.
options Object
Properties
Name Type Argument Description
params Object
Properties
Name Type Description
navMenuArgs Object
Properties
Name Type Argument Description
args_hmac string
theme_location string <optional>
menu number <optional>
constructingContainerContext object <optional>
Since:
  • 4.5.0
Source:

isRelatedSetting(setting, newValue, oldValue)

Return whether the setting is related to this partial.
Parameters:
Name Type Description
setting wp.customize.Value | string Object or ID.
newValue number | object | false | null New value, or null if the setting was just removed.
oldValue number | object | false | null Old value, or null if the setting was just added.
Since:
  • 4.5.0
Source:
Returns:
Type
boolean

refresh()

Make sure that partial fallback behavior is invoked if there is no associated menu.
Since:
  • 4.5.0
Source:
Returns:
Type
Promise

renderContent(placement)

Render content.
Parameters:
Name Type Description
placement wp.customize.selectiveRefresh.Placement
Source: