You are here

function adsense_nodeapi in Google AdSense integration 5.2

Same name and namespace in other branches
  1. 5.3 adsense.module \adsense_nodeapi()
  2. 5 adsense.module \adsense_nodeapi()

Implemenation of hook_nodeapi().

File

./adsense.module, line 1461

Code

function adsense_nodeapi(&$node, $op = 'view', $teaser, $page) {
  switch ($op) {
    case 'view':
      if (variable_get(ADSENSE_SECTION_TARGETING, 1)) {
        $node->content['adsense_start'] = array(
          '#value' => ADSENSE_SECTION_START,
          '#weight' => -1,
        );
        $node->content['adsense_end'] = array(
          '#value' => ADSENSE_SECTION_END,
          '#weight' => 1,
        );
      }
  }
}