You are here

function _adsense_managed_get_block_config in Google AdSense integration 7

Same name and namespace in other branches
  1. 5.3 managed/adsense_managed.module \_adsense_managed_get_block_config()
  2. 6 managed/adsense_managed.module \_adsense_managed_get_block_config()

Configuration of the provided block.

Parameters

int $delta: Block number.

Return value

mixed array with the block configuration or FALSE if no such block was found

3 calls to _adsense_managed_get_block_config()
adsense_managed_block_configure in managed/adsense_managed.module
Implements hook_block_configure().
adsense_managed_block_info in managed/adsense_managed.module
Implements hook_block_info().
adsense_managed_block_view in managed/adsense_managed.module
Implements hook_block_view().

File

managed/adsense_managed.module, line 286
Displays Google AdSense ads on Drupal pages.

Code

function _adsense_managed_get_block_config($delta = 0) {
  if ($data = variable_get('adsense_managed_ad_block_' . $delta, ADSENSE_MANAGED_AD_BLOCK_DEFAULT)) {
    $ad = explode(':', $data);
    $ad[0] = urldecode($ad[0]);
    return $ad;
  }
  return FALSE;
}