You are here

function google_admanager_preprocess_page in DFP Small Business (Google Ad Manager) 6.3

Same name and namespace in other branches
  1. 6 google_admanager.module \google_admanager_preprocess_page()
  2. 6.2 google_admanager.module \google_admanager_preprocess_page()
  3. 7.2 google_admanager.module \google_admanager_preprocess_page()

Implementation of hook_preprocess_page().

File

./google_admanager.module, line 243

Code

function google_admanager_preprocess_page(&$vars) {

  // output the scripts through drupal_add_js()
  $data = google_admanager_get_js();
  if (variable_get('google_admanager_noheader', FALSE)) {
    $vars['gam'] = implode("\n\n", $data);
  }

  // This doesn't have any effect if another module/theme later overides it.
  $vars['scripts'] = drupal_get_js();
}