You are here

function ad_remote_menu in Advertisement 5.2

Same name and namespace in other branches
  1. 5 remote/ad_remote.module \ad_remote_menu()
  2. 6.3 remote/ad_remote.module \ad_remote_menu()
  3. 6 remote/ad_remote.module \ad_remote_menu()
  4. 6.2 remote/ad_remote.module \ad_remote_menu()
  5. 7 remote/ad_remote.module \ad_remote_menu()

Drupal _menu hook.

File

remote/ad_remote.module, line 23
Enhances the ad module to providing cut-and-paste source snippets allowing ads to be easily displayed on remote websites. This module is a proof of concept.

Code

function ad_remote_menu($may_cache) {
  global $user;
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => "ad_remote",
      'title' => 'Remote ads',
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'ad_remote_form',
      ),
      'access' => user_access('host remote advertisements', $user),
    );
  }
  return $items;
}