function ad_is_view_ad_enabled in Advertisement 7.3
Check whether a view is specifically set for ads.
Parameters
$view_name: The name of the view.
$display: (optional) The name of the display to check. Defaults to "default".
Return value
bool TRUE if the view is ad enabled; FALSE otherwise.
1 call to ad_is_view_ad_enabled()
- ad_get_ads in ./
ad.module - Callback for the Ajax request to get ads.
File
- ./
ad.module, line 219 - Core code for the ad module.
Code
function ad_is_view_ad_enabled($view_name, $display = 'default') {
$enabled = FALSE;
foreach (ad_get_info() as $node_type => $info) {
if ($info['display_view'] == $view_name) {
$enabled = TRUE;
continue;
}
}
return $enabled;
}