function theme_adsense_ad in Google AdSense integration 6
Same name and namespace in other branches
- 5.3 adsense.module \theme_adsense_ad()
- 7 adsense.module \theme_adsense_ad()
Default AdSense ad unit theming.
Simply adds a div with the adsense and $module classes.
Parameters
string $ad: String with the generated ad unit.
string $module: Module used to generate the ad.
Return value
string string with the modified ad unit
1 theme call to theme_adsense_ad()
- adsense_display in ./
adsense.module - Generates the Google AdSense Ad.
File
- ./
adsense.module, line 522 - Displays Google AdSense ads on Drupal pages.
Code
function theme_adsense_ad($ad, $module, $format = NULL) {
$dimensions = '';
if (isset($format)) {
$ad_fmt = adsense_ad_formats($format);
$dimensions = "width:{$ad_fmt['width']}px;height:{$ad_fmt['height']}px;";
}
return "<div class='adsense' style='display:inline-block;{$dimensions}'>\n{$ad}\n</div>";
}