function adsense_nodeapi in Google AdSense integration 5.3
Same name and namespace in other branches
- 5 adsense.module \adsense_nodeapi()
- 5.2 adsense.module \adsense_nodeapi()
Implementation of hook_nodeapi().
File
- ./
adsense.module, line 189 - Displays Google AdSense ads on Drupal pages
Code
function adsense_nodeapi(&$node, $op = 'view', $teaser, $page) {
switch ($op) {
case 'view':
if (variable_get('adsense_section_targeting', ADSENSE_SECTION_TARGETING_DEFAULT)) {
$node->content['adsense_start'] = array(
'#value' => '<!-- google_ad_section_start -->',
'#weight' => -5,
);
$node->content['adsense_end'] = array(
'#value' => '<!-- google_ad_section_end -->',
'#weight' => 5,
);
}
}
}