You are here

function block_menu in Drupal 6

Same name and namespace in other branches
  1. 4 modules/block.module \block_menu()
  2. 5 modules/block/block.module \block_menu()
  3. 7 modules/block/block.module \block_menu()

Implementation of hook_menu().

File

modules/block/block.module, line 118
Controls the boxes that are displayed around the main content.

Code

function block_menu() {
  $items['admin/build/block'] = array(
    'title' => 'Blocks',
    'description' => 'Configure what block content appears in your site\'s sidebars and other regions.',
    'page callback' => 'block_admin_display',
    'access arguments' => array(
      'administer blocks',
    ),
    'file' => 'block.admin.inc',
  );
  $items['admin/build/block/list'] = array(
    'title' => 'List',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $items['admin/build/block/list/js'] = array(
    'title' => 'JavaScript List Form',
    'page callback' => 'block_admin_display_js',
    'access arguments' => array(
      'administer blocks',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'block.admin.inc',
  );
  $items['admin/build/block/configure'] = array(
    'title' => 'Configure block',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'block_admin_configure',
    ),
    'access arguments' => array(
      'administer blocks',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'block.admin.inc',
  );
  $items['admin/build/block/delete'] = array(
    'title' => 'Delete block',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'block_box_delete',
    ),
    'access arguments' => array(
      'administer blocks',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'block.admin.inc',
  );
  $items['admin/build/block/add'] = array(
    'title' => 'Add block',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'block_add_block_form',
    ),
    'access arguments' => array(
      'administer blocks',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'block.admin.inc',
  );
  $default = variable_get('theme_default', 'garland');
  foreach (list_themes() as $key => $theme) {
    $items['admin/build/block/list/' . $key] = array(
      'title' => check_plain($theme->info['name']),
      'page arguments' => array(
        $key,
      ),
      'type' => $key == $default ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
      'weight' => $key == $default ? -10 : 0,
      'file' => 'block.admin.inc',
      'access callback' => '_block_themes_access',
      'access arguments' => array(
        $theme,
      ),
    );
  }
  return $items;
}