You are here

function popup_menu_block_view in Popup 8

Same name and namespace in other branches
  1. 7 modules/popup_menu/popup_menu.module \popup_menu_block_view()
  2. 7.x modules/popup_menu/popup_menu.module \popup_menu_block_view()

Implementation of hook_block_view

File

modules/popup_menu/popup_menu.module, line 50

Code

function popup_menu_block_view($delta = 0) {
  module_load_include('inc', 'popup', 'includes/popup.api');
  module_load_include('inc', 'popup_menu', 'includes/popup_menu.util');
  $settings = _popup_menu_settings();
  $settings = isset($settings[$delta]) ? $settings[$delta] : _popup_menu_default_settings();
  $attributes = array();
  $attributes['format'] = $settings['format'];
  $attributes['menu'] = $delta;
  $attributes['title'] = isset($settings['override-title']) && $settings['override-title'] != '' ? $settings['override-title'] : FALSE;
  return array(
    'content' => popup($attributes),
  );
}