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.

Method of the class: WP_Customize_Widgets{}

No Hooks.

Return

String. MAC for serialized widget instance.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_instance_hash_key( $serialized_instance );
$serialized_instance(string) (required)
Widget instance.

Changelog

Since 3.9.0 Introduced.

WP_Customize_Widgets::get_instance_hash_key() code WP 6.5.2

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