On this page
WP_Customize_Nav_Menus::hash_nav_menu_args( array $args ): string
Hashes (hmac) the nav menu arguments to ensure they are not tampered with when submitted in the Ajax request.
Description
Note that the array is expected to be pre-sorted.
Parameters
$argsarray Required-
The arguments to hash.
Return
string Hashed nav menu arguments.
Source
File: wp-includes/class-wp-customize-nav-menus.php. View all references
public function hash_nav_menu_args( $args ) {
return wp_hash( serialize( $args ) );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_hash() wp-includes/pluggable.php | Gets hash of given string. |
Used By
| Used By | Description |
|---|---|
| WP_Customize_Nav_Menus::render_nav_menu_partial() wp-includes/class-wp-customize-nav-menus.php | Renders a specific menu via wp_nav_menu() using the supplied arguments. |
| WP_Customize_Nav_Menus::filter_wp_nav_menu_args() wp-includes/class-wp-customize-nav-menus.php | Keeps track of the arguments that are being passed to wp_nav_menu() . |
Changelog
| Version | Description |
|---|---|
| 4.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_nav_menus/hash_nav_menu_args