function _strip_utf8mb4_for in Strip 4-byte UTF8 7
Return TRUE if the text field widget type is enabled from the configurations.
Parameters
string $field_widget_type:
Return value
bool
1 call to _strip_utf8mb4_for()
- strip_utf8mb4_field_attach_presave in ./
strip_utf8mb4.module - Implements hook_field_attach_presave().
File
- ./
strip_utf8mb4.module, line 114 - Allow users to Strip 4-byte UTF8 characters. overly long 2 byte sequences, as well as characters above U+10000, and reject overly long 3 byte sequences and UTF-16
Code
function _strip_utf8mb4_for($field_widget_type) {
// Get list of text filed widget types to be filterd or replaced.
$strip_utf8mb4_for = variable_get('strip_utf8mb4_for_text_field_widget_types', array(
'text_textfield',
'text_textarea',
'text_textarea_with_summary',
'core_title',
));
return in_array($field_widget_type, $strip_utf8mb4_for, TRUE);
}