function _seckit_explode_value in Security Kit 7
Converts a multi-line (or otherwise delimited) string to an array of strings. Sanitises each value by trimming whitespace, and filters empty values from the array.
Parameters
string $text: String of delimited values.
string $delimiter: Value delimiter. Defaults to newline for handling multi-line strings.
2 calls to _seckit_explode_value()
- seckit_admin_form_validate in includes/
seckit.form.inc - Validates form data.
- _seckit_get_options in ./
seckit.module - Return the current SecKit settings.
File
- ./
seckit.module, line 729 - Allows administrators to improve security of the website.
Code
function _seckit_explode_value($text, $delimiter = "\n") {
$values = explode($delimiter, $text);
return array_values(array_filter(array_map('trim', $values)));
}