if (CRM_Core_Permission::check('access CiviEvent') &&
CRM_Core_Permission::check('edit event participants')
) {
- $shortCuts = array_merge($shortCuts, array(
- array('path' => 'civicrm/participant/add',
- 'query' => "reset=1&action=add&context=standalone",
- 'ref' => 'new-participant',
- 'title' => ts('Event Registration'),
- )));
+ $shortCut[] = array(
+ 'path' => 'civicrm/participant/add',
+ 'query' => "reset=1&action=add&context=standalone",
+ 'ref' => 'new-participant',
+ 'title' => ts('Event Registration'),
+ );
if ($newCredit) {
$title = ts('Event Registration') . '<br /> (' . ts('credit card') . ')';
- $shortCuts = array_merge($shortCuts, array(
- array('path' => 'civicrm/participant/add',
- 'query' => "reset=1&action=add&context=standalone&mode=live",
- 'ref' => 'new-participant-cc',
- 'title' => $title,
- )));
+ $shortCut[0]['shortCuts'][] = array(
+ 'path' => 'civicrm/participant/add',
+ 'query' => "reset=1&action=add&context=standalone&mode=live",
+ 'ref' => 'new-participant-cc',
+ 'title' => $title,
+ );
}
+ $shortCuts = array_merge($shortCuts, $shortCut);
}
}
}