function revenue_sharing_basic_requirements in Google AdSense integration 6
Same name and namespace in other branches
- 5.3 old/revenue_sharing_basic/revenue_sharing_basic.module \revenue_sharing_basic_requirements()
- 7 old/revenue_sharing_basic/revenue_sharing_basic.install \revenue_sharing_basic_requirements()
Implementation of hook_requirements().
File
- old/
revenue_sharing_basic/ revenue_sharing_basic.module, line 47 - Main file of the revenue_sharing_basic module.
Code
function revenue_sharing_basic_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
// At runtime, make sure that we have a publisher ID.
case 'runtime':
if (variable_get('cache', 0) && variable_get('adsense_id_module', ADSENSE_ID_MODULE_DEFAULT) == 'revenue_sharing_basic_adsense') {
$requirements['revenue_sharing_nocache'] = array(
'title' => $t('Revenue Sharing'),
'value' => $t('Drupal page cache is enabled.'),
'description' => $t('This causes conflicts with revenue sharing, since the pages are stored in the cache and are not dynamically generated. If you experience issues with revenue sharing, then disable the page cache.'),
'severity' => REQUIREMENT_WARNING,
);
}
break;
}
return $requirements;
}