WordPress at a glance
function is not described

WP_Customize_Nav_Menu_Setting::amend_customize_save_response() public WP 4.3.0

Export data for the JS client.

{} It's a method of the class: WP_Customize_Nav_Menu_Setting{}

No Hooks.

Return

Array. Export data.

Usage

$WP_Customize_Nav_Menu_Setting = new WP_Customize_Nav_Menu_Setting();
$WP_Customize_Nav_Menu_Setting->amend_customize_save_response( $data );
$data(array) (required)
Additional information passed back to the 'saved' event on wp.customize.

Notes

Changelog

Since 4.3.0 Introduced.

Code of WP_Customize_Nav_Menu_Setting::amend_customize_save_response() WP 5.7.2

<?php
public function amend_customize_save_response( $data ) {
	if ( ! isset( $data['nav_menu_updates'] ) ) {
		$data['nav_menu_updates'] = array();
	}
	if ( ! isset( $data['widget_nav_menu_updates'] ) ) {
		$data['widget_nav_menu_updates'] = array();
	}

	$data['nav_menu_updates'][] = array(
		'term_id'          => $this->term_id,
		'previous_term_id' => $this->previous_term_id,
		'error'            => $this->update_error ? $this->update_error->get_error_code() : null,
		'status'           => $this->update_status,
		'saved_value'      => 'deleted' === $this->update_status ? null : $this->value(),
	);

	$data['widget_nav_menu_updates'] = array_merge(
		$data['widget_nav_menu_updates'],
		$this->_widget_nav_menu_updates
	);
	$this->_widget_nav_menu_updates  = array();

	return $data;
}