-
<static> applySavedData(data)
-
When customize_save comes back with a success, make sure any inserted
nav menus and items are properly re-added with their newly-assigned IDs.
Parameters:
Name |
Type |
Description |
data |
object
|
Properties
Name |
Type |
Description |
nav_menu_updates |
array
|
|
nav_menu_item_updates |
array
|
|
|
- Source:
-
-
-
Focus a menu item control.
Parameters:
Name |
Type |
Description |
menuItemId |
string
|
|
- Source:
-
-
<static> generatePlaceholderAutoIncrementId()
-
Newly-created Nav Menus and Nav Menu Items have negative integer IDs which
serve as placeholders until Save & Publish happens.
- Source:
-
Returns:
-
Type
-
number
-
-
Get the control for a given menu.
Parameters:
Name |
Type |
Description |
menuId |
|
|
- Source:
-
Returns:
-
Type
-
Array:.<wp.customize.controlConstructor.menus:>
-
-
Given a menu item ID, get the control associated with it.
Parameters:
Name |
Type |
Description |
menuItemId |
string
|
|
- Source:
-
Returns:
-
Type
-
object
|
null
-
<static> insertAutoDraftPost(params)
-
Insert a new `auto-draft` post.
Parameters:
Name |
Type |
Description |
params |
object
|
Parameters for the draft post to create.
Properties
Name |
Type |
Description |
post_type |
string
|
Post type to add. |
post_title |
string
|
Post title to use. |
|
- Since:
-
- Source:
-
Returns:
Promise resolved with the added post.
-
Type
-
jQuery.promise
-
-
Apply sanitize_text_field()-like logic to the supplied name, returning a
"unnammed" fallback string if the name is then empty.
Parameters:
Name |
Type |
Description |
name |
string
|
|
- Source:
-
Returns:
-
Type
-
string
-
-
Parameters:
Name |
Type |
Description |
menuItemId |
String
|
|
- Source:
-