You are here

function dynamicload_block_list in Javascript Tools 5

List blocks available to the current user on the current page.

File

dynamicload/dynamicload.module, line 351
Enable AJAX-based loading of selected page elements.

Code

function dynamicload_block_list() {
  global $theme_key;
  $blocks = array();
  if ($theme_key) {
    $regions = system_region_list($theme_key);
    foreach (array_keys($regions) as $region) {
      $block_list = block_list($region);
      $blocks = array_merge($blocks, $block_list);
    }
  }
  return $blocks;
}