You are here

function dfp_token_info in Doubleclick for Publishers (DFP) 8

Same name and namespace in other branches
  1. 7.2 dfp.module \dfp_token_info()
  2. 7 dfp.module \dfp_token_info()

Implements hook_token_info().

File

./dfp.tokens.inc, line 13
Builds placeholder replacement tokens for DFP Ad tag data.

Code

function dfp_token_info() {
  $type = [
    'name' => t('DFP Ad Tags'),
    'description' => t('Tokens related to a given DFP ad tag.'),
    'needs-data' => 'dfp_tag',
  ];
  $tag['slot'] = [
    'name' => t('Slot Name'),
    'description' => t("The name of the ad slot defined by this tag."),
  ];
  $tag['network_id'] = [
    'name' => t("Network ID"),
    'description' => t("The unique ID provided by Google."),
  ];
  return [
    'types' => [
      'dfp_tag' => $type,
    ],
    'tokens' => [
      'dfp_tag' => $tag,
    ],
  ];
}