You are here

function _adsense_tag_flexiblock in Google AdSense integration 5.2

Same name and namespace in other branches
  1. 5 adsense.module \_adsense_tag_flexiblock()
1 call to _adsense_tag_flexiblock()
_adsense_process_tags in ./adsense.module

File

./adsense.module, line 1354

Code

function _adsense_tag_flexiblock($location) {
  if (module_exists('flexiblock')) {

    // Tag is in [adsense:flexiblock:1] format
    $blocks = theme('flexiblock_blocks', $location);
    foreach ($blocks as $block) {
      $ad = $block['content'];
    }
  }
  else {
    $ad = '<!--adsense: flexiblock not installed -->';
  }
  return $ad;
}