I’m trying to get a full list of blocks that are active content on the current page. Preferably it would include details of what type of content is displayed in the block.
I need this information to display ads in the blocks. The ads need to be loaded through the javascript snippet, that I can place in the header (through drupal_add_js). But first I need to know if the block that contains the ad is active and that’s why I need this list of blocks.
I’m using Drupal 7.