function page_manager_contact_site_menu_alter
Callback defined by page_manager_contact_site_page_manager_tasks().
Alter the node edit input so that node edit comes to us rather than the normal node edit process.
1 string reference to 'page_manager_contact_site_menu_alter'
- page_manager_contact_site_page_manager_tasks in page_manager/
plugins/ tasks/ contact_site.inc - Specialized implementation of hook_page_manager_task_tasks(). See api-task.html for more information.
File
-
page_manager/
plugins/ tasks/ contact_site.inc, line 45
Code
function page_manager_contact_site_menu_alter(&$items, $task) {
if (variable_get('page_manager_contact_site_disabled', TRUE)) {
return;
}
$callback = $items['contact']['page callback'];
if ($callback == 'drupal_get_form') {
$callback = $items['contact']['page arguments'][0];
}
// Override the node edit handler for our purpose.
if ($callback == 'contact_site_form' || variable_get('page_manager_override_anyway', FALSE)) {
$items['contact']['page callback'] = 'page_manager_contact_site';
$items['contact']['file path'] = $task['path'];
$items['contact']['file'] = $task['file'];
}
else {
variable_set('page_manager_contact_site_disabled', TRUE);
if (!empty($GLOBALS['page_manager_enabling_contact_site'])) {
drupal_set_message(t('Page manager module is unable to enable contact because some other module already has overridden with %callback.', array(
'%callback' => $callback,
)), 'warning');
}
return;
}
}