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.
$argsarrayrequired
public function hash_nav_menu_args( $args ) {
return wp_hash( serialize( $args ) );
}
| Version | Description |
|---|---|
| 4.3.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_nav_menus/hash_nav_menu_args