Skip to content
Snippets Groups Projects

Issue #2545092: Token displayed if value is empty

1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
+ 3
3
@@ -24,7 +24,7 @@ function tracking_code_init() {
foreach ($snippets['header'] as $id => $snippet) {
drupal_add_html_head(array(
'#type' => 'markup',
'#markup' => token_replace($snippet->code, array('node' => $node)),
'#markup' => token_replace($snippet->code, array('node' => $node), array('clear' => TRUE)),
'#weight' => $snippet->weight,
), 'tracking_code_' . $id);
}
@@ -41,7 +41,7 @@ function tracking_code_page_alter(&$page) {
// Render "After <BODY>" tracking code.
foreach ($snippets['page_top'] as $snippet) {
$page['page_top']['tracking_code'][$snippet->name] = array(
'#markup' => token_replace($snippet->code, array('node' => $node)),
'#markup' => token_replace($snippet->code, array('node' => $node), array('clear' => TRUE)),
'#weight' => $snippet->weight,
);
}
@@ -49,7 +49,7 @@ function tracking_code_page_alter(&$page) {
// Render "Before </BODY>" tracking code.
foreach ($snippets['page_bottom'] as $snippet) {
$page['page_bottom']['tracking_code'][$snippet->name] = array(
'#markup' => token_replace($snippet->code, array('node' => $node)),
'#markup' => token_replace($snippet->code, array('node' => $node), array('clear' => TRUE)),
'#weight' => $snippet->weight,
);
}
Loading