Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to alter/remove tag #2

Open
wants to merge 11 commits into
base: 7.x-1.x
Choose a base branch
from
6 changes: 3 additions & 3 deletions dfp.module
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down