You are here

function adsense_cse_menu in Google AdSense integration 6

Same name and namespace in other branches
  1. 5.3 cse/adsense_cse.module \adsense_cse_menu()
  2. 7 cse/adsense_cse.module \adsense_cse_menu()

Implementation of hook_menu().

File

cse/adsense_cse.module, line 27
Displays Google AdSense ads on Drupal pages.

Code

function adsense_cse_menu() {
  $items = array();
  $results_path = variable_get('clean_url', 0) ? ADSENSE_CSE_RESULTS_PATH : '.';
  $items['admin/settings/adsense/cse'] = array(
    'title' => 'Custom Search',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'adsense_cse_settings',
    ),
    'access arguments' => array(
      'administer adsense',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
    'file' => 'adsense_cse.admin.inc',
  );
  $items[$results_path] = array(
    'title' => 'Search Results',
    'page callback' => '_adsense_cse_results',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'adsense_cse.results.inc',
  );
  return $items;
}