function _select_with_style_validate_hierarchy_depth_prefix in Select with Style 7
Check whether the element value is already plain or will be sanitized.
Parameters
array $element:
array $form_state:
2 string references to '_select_with_style_validate_hierarchy_depth_prefix'
- select_with_style_admin_configure in select_with_style/
select_with_style.admin.inc - Menu callback for admin configuration settings.
- select_with_style_field_widget_settings_form in select_with_style/
select_with_style.module - Implements hook_field_widget_settings_form().
File
- select_with_style/
select_with_style.module, line 492 - select_with_style.module
Code
function _select_with_style_validate_hierarchy_depth_prefix($element, &$form_state) {
$prefix = $element['#value'];
if (!empty($prefix)) {
$sanitized_prefix = check_plain($prefix);
if ($sanitized_prefix != $prefix) {
drupal_set_message(t('This prefix will be sanitized and will appear in the select list like this: "!prefix"', array(
'!prefix' => $sanitized_prefix,
)));
}
}
}