function opigno_calendar_app_menu_local_tasks_alter in Opigno Calendar App 7
Implements hook_menu_local_tasks_alter().
File
- ./
opigno_calendar_app.module, line 18 - Module file. Defines module hooks.
Code
function opigno_calendar_app_menu_local_tasks_alter(&$data, $router_item, $root_path) {
if (preg_match('/^opigno-calendar/', $root_path)) {
$item = menu_get_item('node/add/calendar-event');
if ($item['access']) {
$item['title'] = t("Add a new event");
$item['options']['attributes']['class'][] = $item['localized_options']['attributes']['class'][] = 'opigno-calendar-app-add-calendar-event';
$data['actions']['output'][] = array(
'#theme' => 'menu_local_action',
'#link' => $item,
);
}
}
}