You are here

function flush_page_cache_menu in Flush page cache 6

Same name and namespace in other branches
  1. 7 flush_page_cache.module \flush_page_cache_menu()

Implementation of hook_menu().

File

./flush_page_cache.module, line 17
Easing the pain when you need to flush...Drupal's cache.

Code

function flush_page_cache_menu() {
  $items = array();

  // Add a link under admin_menu
  $items['admin_menu/flush-page-cache'] = array(
    'page callback' => 'flush_page_cache_admin_menu_flush_cache',
    'access arguments' => array(
      'flush page cache',
    ),
    'file' => 'flush_page_cache.admin.inc',
    'type' => MENU_CALLBACK,
  );

  // Admin settings
  $items['admin/settings/flush_page_cache'] = array(
    'title' => 'Flush page cache',
    'description' => "Easing the pain when you need to flush...Drupal's cache.",
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flush_page_cache_admin_settings',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'flush_page_cache.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/settings/flush_page_cache/js'] = array(
    'page callback' => 'flush_page_cache_custom_settings_table_js',
    'access arguments' => array(
      'administer site configuration',
    ),
    'file' => 'flush_page_cache.admin.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}