diff --git a/dfp.module b/dfp.module index 55acbfa..1e96a4f 100755 --- a/dfp.module +++ b/dfp.module @@ -554,15 +554,15 @@ function dfp_format_targeting($targeting, $tag = '') { $target['target'] = '"' . check_plain($target['target']) . '"'; $target['value'] = dfp_token_replace(check_plain($target['value']), $tag, array('sanitize' => TRUE, 'clear' => TRUE)); + // Allow other modules to alter the target. + drupal_alter('dfp_target', $target); + // The target value could be blank if tokens are used. If so, removed it. if (empty($target['value'])) { unset($targeting[$key]); continue; } - // Allow other modules to alter the target. - drupal_alter('dfp_target', $target); - // Convert the values into an array and trim the whitespace from each value. $values = explode(',', $target['value']); $values = array_map('trim', $values);