WordPress at Your Fingertips
function is not described

WP_Customize_Nav_Menus::hash_nav_menu_args() public WP 4.3.0

Hashes (hmac) the nav menu arguments to ensure they are not tampered with when submitted in the Ajax request.

Note that the array is expected to be pre-sorted.

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

No Hooks.


String. Hashed nav menu arguments.


$WP_Customize_Nav_Menus = new WP_Customize_Nav_Menus();
$WP_Customize_Nav_Menus->hash_nav_menu_args( $args );
$args(array) (required)
The arguments to hash.


Since 4.3.0 Introduced.

Code of WP_Customize_Nav_Menus::hash_nav_menu_args() WP 5.8.2

public function hash_nav_menu_args( $args ) {
	return wp_hash( serialize( $args ) );