WP_Customize_Nav_Menus::hash_nav_menu_args()
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.
Method of the class: WP_Customize_Nav_Menus{}
No Hooks.
Return
String
. Hashed nav menu arguments.
Usage
$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.
Changelog
Since 4.3.0 | Introduced. |
WP_Customize_Nav_Menus::hash_nav_menu_args() WP Customize Nav Menus::hash nav menu args code WP 6.6.2
public function hash_nav_menu_args( $args ) { return wp_hash( serialize( $args ) ); }