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.

{} It's a method of the class: WP_Customize_Widgets{}

No Hooks.


String. MAC for serialized widget instance.


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


Since 3.9.0 Introduced.

Code of WP_Customize_Widgets::get_instance_hash_key() WP 6.0

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