You are here

function adsense_cse_menu in Google AdSense integration 5.3

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

Code

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