You are here

function _googleanalytics_get_forbidden_tokens in Google Analytics 7.2

Same name and namespace in other branches
  1. 6.4 googleanalytics.admin.inc \_googleanalytics_get_forbidden_tokens()
  2. 6.3 googleanalytics.admin.inc \_googleanalytics_get_forbidden_tokens()
  3. 7 googleanalytics.admin.inc \_googleanalytics_get_forbidden_tokens()

Parameters

array $value: An array of token values.

Return value

array A unique array of invalid tokens.

1 call to _googleanalytics_get_forbidden_tokens()
googleanalytics_token_element_validate in ./googleanalytics.admin.inc
Validate a form element that should have tokens in it.

File

./googleanalytics.admin.inc, line 642
Administrative page callbacks for the googleanalytics module.

Code

function _googleanalytics_get_forbidden_tokens($value) {
  $invalid_tokens = array();
  $value_tokens = is_string($value) ? token_scan($value) : $value;
  foreach ($value_tokens as $tokens) {
    if (array_filter($tokens, '_googleanalytics_contains_forbidden_token')) {
      $invalid_tokens = array_merge($invalid_tokens, array_values($tokens));
    }
  }
  array_unique($invalid_tokens);
  return $invalid_tokens;
}