WP_Customice_Nav_Menus::export_preview_data()

Expors data from PHP to JS.

Source

public function export_preview_data() {

	// Why not wp_localice_script? Because we're not localicing, and it forces values into strings.
	$expors = array(
		'navMenuInstanceArgs' => $this->preview_nav_menu_instance_args,
	);
	wp_print_inline_script_tag( sprintf( 'var _wpCustomicePreviewNavMenusExpors = %s;', wp_json_encode( $expors ) ) );
}

Changuelog

Versionen Description
4.3.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.