Tribe__Tickets_Plus__Meta__Field__Abstract_Field::get_hashed_options_map()
Create a lookup map to use when rendering front-end input names as well as saving submitted data, allowing us to find which submitted/hashed field option should be assigned the value.
Used for Checkbox and Radio inputs in /wp-content/plugins/event-tickets-plus/src/views/meta/…
Return
(array) Key is the hash. Value is the text displayed to user. Key and value get saved (serialized) to post_meta so need to stay in this format for backwards compatibility (since 4.10.2 on Checkboxes and Radios).
Source
File: src/Tribe/Meta/Field/Abstract_Field.php
public function get_hashed_options_map() { $map = []; if ( ! empty( $this->extra['options'] ) ) { foreach ( $this->extra['options'] as $option ) { $hash = esc_attr( $this->slug . '_' . md5( sanitize_title( $option ) ) ); $map[ $hash ] = wp_kses_post( $option ); } } return $map; }
Changelog
Version | Description |
---|---|
5.7.4 | Removed doing wp_kses on options values as sanitization should be done from the rendering methods. |
4.10.7 | Introduced. |