WP_Customize_Widgets::get_instance_hash_key( string $serialized_instance ): string
- Since
- 3.9.0
- Source
wp-includes/class-wp-customize-widgets.php:1440
Retrieves MAC for a serialized widget instance string.
Description
Allows values posted back from JS to be rejected if any tampering of the data has occurred.
Parameters
$serialized_instancestring- Widget instance.
Return
string- MAC for serialized widget instance.
Uses · 1
- wp_hash()Gets the hash of the given string.
Used by · 2
- WP_Customize_Widgets::sanitize_widget_instance()Sanitizes a widget instance.
- WP_Customize_Widgets::sanitize_widget_js_instance()Converts a widget instance into JSON-representable format.
Source
protected function get_instance_hash_key( $serialized_instance ) { return wp_hash( $serialized_instance ); }History
Introduced in 3.9.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.0.4 tag, from
src/wp-includes/class-wp-customize-widgets.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.