function adsense_cse_menu in Google AdSense integration 7
Same name and namespace in other branches
- 5.3 cse/adsense_cse.module \adsense_cse_menu()
- 6 cse/adsense_cse.module \adsense_cse_menu()
Implements hook_menu().
File
- cse/
adsense_cse.module, line 28 - 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 : '.';
$resultsv2_path = variable_get('clean_url', 0) ? ADSENSE_CSE_V2_RESULTS_PATH : '.';
$items['admin/config/services/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',
);
$items[$resultsv2_path . '/%'] = array(
'title' => 'Search Results',
'page callback' => '_adsense_csev2_results',
'page arguments' => array(
1,
),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
'file' => 'adsense_csev2.results.inc',
);
return $items;
}