function _adsense_check_if_enabled in Google AdSense integration 5
Same name and namespace in other branches
- 5.3 adsense.module \_adsense_check_if_enabled()
- 5.2 adsense.module \_adsense_check_if_enabled()
- 6 adsense.module \_adsense_check_if_enabled()
- 7 adsense.module \_adsense_check_if_enabled()
1 call to _adsense_check_if_enabled()
File
- ./
adsense.module, line 1054
Code
function _adsense_check_if_enabled() {
$client_id = adsense_get_client_id();
$disable_ads = variable_get(ADSENSE_DISABLE, '0');
if (!$client_id) {
// Google AdSense Client ID is not configured
return FALSE;
}
if ($disable_ads) {
return FALSE;
}
if (variable_get(ADSENSE_TEST_MODE, 0)) {
return TRUE;
}
if (user_access('hide adsense')) {
return FALSE;
}
return TRUE;
}