You are here

dfp.api.php in Doubleclick for Publishers (DFP) 7.2

Same filename and directory in other branches
  1. 8 dfp.api.php
  2. 7 dfp.api.php

Hooks provided by the Chaos Tool Suite.

This file is divided into static hooks (hooks with string literal names) and dynamic hooks (hooks with pattern-derived string names).

File

dfp.api.php
View source
<?php

/**
 * @file
 * Hooks provided by the Chaos Tool Suite.
 *
 * This file is divided into static hooks (hooks with string literal names) and
 * dynamic hooks (hooks with pattern-derived string names).
 */

/**
 * @addtogroup hooks
 * @{
 */

/**
 * Alter the raw tag object just after it is loaded from the database.
 *
 * @param object $tag
 */
function hook_dfp_tag_load_alter(&$tag) {
}

/**
 * Alter the tag object just after it is loaded and the settings have been
 * loaded properly.
 *
 * @param object $tag
 */
function hook_dfp_tag_alter(&$tag) {
}

/**
 * Alter a targeting key|value pair.
 *
 * @param array $target
 */
function hook_dfp_target_alter(&$target) {
}

/**
 * Alter the global targeting key|value pairs.
 *
 * @param array $target
 */
function hook_dfp_global_targeting_alter(&$target) {

  // The following example adds the URL arguments array to the targeting.
  $arg = arg();
  if (!empty($arg)) {
    $targeting[] = array(
      'target' => 'arg',
      'value' => $arg,
    );
  }
}

/**
 * Alter the keyvals array that is about to be used during the construction of
 * a short tag.
 *
 * @param array $keyvals
 */
function hook_dfp_short_tag_keyvals_alter(&$keyvals) {
}

/**
 * @} End of "addtogroup hooks".
 */

Functions

Namesort descending Description
hook_dfp_global_targeting_alter Alter the global targeting key|value pairs.
hook_dfp_short_tag_keyvals_alter Alter the keyvals array that is about to be used during the construction of a short tag.
hook_dfp_tag_alter Alter the tag object just after it is loaded and the settings have been loaded properly.
hook_dfp_tag_load_alter Alter the raw tag object just after it is loaded from the database.
hook_dfp_target_alter Alter a targeting key|value pair.