You are here

function adsense_search_menu in Google AdSense integration 6

Same name and namespace in other branches
  1. 5.3 old/search/adsense_search.module \adsense_search_menu()
  2. 7 old/search/adsense_search.module \adsense_search_menu()

Implementation of hook_menu().

File

old/search/adsense_search.module, line 38
Displays Google AdSense ads on Drupal pages.

Code

function adsense_search_menu() {
  $items = array();
  $results_path = variable_get('clean_url', 0) ? ADSENSE_SEARCH_RESULTS_PATH : '.';
  $items['admin/settings/adsense/search'] = array(
    'title' => 'Search',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'adsense_search_settings',
    ),
    'access arguments' => array(
      'administer adsense',
    ),
    'weight' => 4,
    'type' => MENU_LOCAL_TASK,
    'file' => 'adsense_search.admin.inc',
  );
  $items[$results_path] = array(
    'title' => 'Search Results',
    'page callback' => '_adsense_search_results',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
    'file' => 'adsense_search.results.inc',
  );
  return $items;
}