WordPress at a glance
function is not described

WP_Customize_Nav_Menus::export_preview_data() public WP 4.3.0

Exports data from PHP to JS.

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

No Hooks.

Return

null. Null. Nothing.

Usage

$WP_Customize_Nav_Menus = new WP_Customize_Nav_Menus();
$WP_Customize_Nav_Menus->export_preview_data();

Changelog

Since 4.3.0 Introduced.

Code of WP_Customize_Nav_Menus::export_preview_data() WP 5.7

<?php
public function export_preview_data() {

	// Why not wp_localize_script? Because we're not localizing, and it forces values into strings.
	$exports = array(
		'navMenuInstanceArgs' => $this->preview_nav_menu_instance_args,
	);
	printf( '<script>var _wpCustomizePreviewNavMenusExports = %s;</script>', wp_json_encode( $exports ) );
}