You are here

function google_cse_menu in Google Custom Search Engine 7.3

Same name and namespace in other branches
  1. 5 google_cse.module \google_cse_menu()
  2. 6 google_cse.module \google_cse_menu()

Implements hook_menu().

File

./google_cse.module, line 32
Display a Google Custom Search Engine (CSE) on your site.

Code

function google_cse_menu() {

  // If no Search module in core, then we need to make our own admin page.
  if (!module_exists('search')) {

    //    $items = array();
    $items['admin/config/search/cse-settings'] = array(
      'title' => 'Configure Google CSE',
      'description' => '',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'google_cse_admin_settings',
      ),
      'file' => 'google_cse.admin.inc',
      'access arguments' => array(
        'administer Google CSE',
      ),
    );
  }
  $items['admin/config/search/export-cse'] = array(
    'title' => 'Google CSE XML',
    'description' => 'Export custom search engine code',
    'type' => MENU_NORMAL_ITEM,
    'page callback' => 'google_cse_render_xml',
    'access callback' => 'google_cse_render_xml_access',
  );
  return $items;
}