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.

The serialized arguments are prefixed so that the resulting hash cannot collide with other wp_hash() computed over serialized data.

Метод класса: WP_Customize_Nav_Menus{}

Хуков нет.

Возвращает

string. Hashed nav menu arguments.

Использование

$WP_Customize_Nav_Menus = new WP_Customize_Nav_Menus();
$WP_Customize_Nav_Menus->hash_nav_menu_args( $args );
$args(массив) (обязательный)
The arguments to hash.

Список изменений

С версии 4.3.0 Введена.
С версии 7.1.5 The hash is now domain-separated from other hashes.

Код WP_Customize_Nav_Menus::hash_nav_menu_args() WP 7.1.5

public function hash_nav_menu_args( $args ) {
	return wp_hash( 'customize_nav_menu_args|' . serialize( $args ) );
}