You are here

function panels_mini_block_info in Panels 7.3

Implementation of hook_block_info().

File

panels_mini/panels_mini.module, line 68
panels_mini.module

Code

function panels_mini_block_info() {

  // Safety: go away if CTools is not at an appropriate version.
  if (!defined('PANELS_REQUIRED_CTOOLS_API') || !module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API)) {
    return array();
  }
  $blocks = array();
  $minis = panels_mini_load_all();
  foreach ($minis as $panel_mini) {
    if (empty($panel_mini->disabled) && (module_exists('page_manager') || empty($panel_mini->requiredcontexts))) {
      $blocks[$panel_mini->name] = array(
        'info' => t('Mini panel: "@title"', array(
          '@title' => $panel_mini->admin_title,
        )),
        'cache' => DRUPAL_NO_CACHE,
      );
    }
  }
  return $blocks;
}