WP_Customize_Widgets::get_instance_hash_key()protectedWP 3.9.0

Retrieves MAC for a serialized widget instance string.

Allows values posted back from JS to be rejected if any tampering of the data has occurred.

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

Хуков нет.

Возвращает

Строку. MAC for serialized widget instance.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_instance_hash_key( $serialized_instance );
$serialized_instance(строка) (обязательный)
Widget instance.

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

С версии 3.9.0 Введена.

Код WP_Customize_Widgets::get_instance_hash_key() WP 6.5.2

protected function get_instance_hash_key( $serialized_instance ) {
	return wp_hash( $serialized_instance );
}