You are here

function _dfp_prepare_adunit in Doubleclick for Publishers (DFP) 7.2

Same name and namespace in other branches
  1. 7 dfp.module \_dfp_prepare_adunit()

Check adunit has a value and/or if the global should be used.

Parameters

object $tag:

Return value

object $tag

2 calls to _dfp_prepare_adunit()
template_preprocess_dfp_short_tag in ./dfp.module
Preprocess function for DFP tags.
template_preprocess_dfp_tag in ./dfp.module
Preprocess function for DFP tags.

File

./dfp.module, line 882

Code

function _dfp_prepare_adunit($tag) {
  $global_adunit = variable_get('dfp_default_adunit', '');
  if (empty($tag->adunit) && !empty($global_adunit)) {
    $tag->adunit = $global_adunit;
  }
  return $tag;
}