function _matomo_get_forbidden_tokens in Matomo Analytics 7.2
Parameters
array $value: An array of token values.
Return value
array A unique array of invalid tokens.
1 call to _matomo_get_forbidden_tokens()
- matomo_token_element_validate in ./
matomo.admin.inc - Validate a form element that should have tokens in it.
File
- ./
matomo.admin.inc, line 575 - Administrative page callbacks for the matomo module.
Code
function _matomo_get_forbidden_tokens($value) {
$invalid_tokens = array();
$value_tokens = is_string($value) ? token_scan($value) : $value;
foreach ($value_tokens as $type => $tokens) {
if (array_filter($tokens, '_matomo_contains_forbidden_token')) {
$invalid_tokens = array_merge($invalid_tokens, array_values($tokens));
}
}
array_unique($invalid_tokens);
return $invalid_tokens;
}