Skip to content

Instantly share code, notes, and snippets.

@ipwa
Created April 10, 2015 16:32
Show Gist options
  • Save ipwa/77274272e3df05d09469 to your computer and use it in GitHub Desktop.
Save ipwa/77274272e3df05d09469 to your computer and use it in GitHub Desktop.
Email Contact hook_menu
/**
* Implements hook_menu().
*/
function email_contact_menu() {
$items['email-contact/%/%/%'] = array(
'title' => 'Email Contact Form',
'page callback' => 'email_contact_mail_page',
'page arguments' => array(1, 2, 3),
'access callback' => 'user_access',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
$items['admin/config/content/email-contact'] = array(
'title' => 'Email Contact Form Settings',
'description' => 'Administer flood control settings for email contact forms',
'page callback' => 'drupal_get_form',
'page arguments' => array('email_contact_admin_settings'),
'access arguments' => array('administer site configuration'),
'type' => MENU_CALLBACK,
);
return $items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment