You are here

function ad_get_info in Advertisement 7.3

Return the info about the node type(s) that implement ads.

Parameters

bool $cache: (optional) Whether to use the cache, if possible. Defaults to FALSE.

Return value

array An array with the info about the ad node types.

3 calls to ad_get_info()
ad_get_destination in ./ad.module
Return the destination URL of an ad.
ad_is_node_ad in ./ad.module
Return whether a node is used for ads.
ad_is_view_ad_enabled in ./ad.module
Check whether a view is specifically set for ads.

File

./ad.module, line 253
Core code for the ad module.

Code

function ad_get_info($cache = TRUE) {
  if (!$cache) {
    $info = array();
    foreach (module_implements('ad_info') as $module) {
      $info = array_merge($info, module_invoke($module, 'ad_info'));
    }
    return $info;
  }
  else {
    return ad_get_cache('ad_get_info', array(
      FALSE,
    ));
  }
}