function ad_is_node_ad in Advertisement 7.3
Return whether a node is used for ads.
Parameters
stdClass|array $node: A node object or array.
Return value
bool Whether the node is used for ads.
2 calls to ad_is_node_ad()
- ad_menu_local_tasks_alter in ./
ad.module - Implements hook_menu_local_tasks_alter().
- ad_preprocess_node in ./
ad.module - Implements hook_preprocess_node().
File
- ./
ad.module, line 239 - Core code for the ad module.
Code
function ad_is_node_ad($node) {
$type = is_object($node) ? $node->type : $node['type'];
return in_array($type, array_keys(ad_get_info()));
}