You are here

function adsense_search_menu in Google AdSense integration 5.3

Same name and namespace in other branches
  1. 6 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 41
Displays Google AdSense ads on Drupal pages

Code

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