post_status) {
case 'publish':
$actions['details'] = array(
'label' => __('Details', 'wp-event-manager'),
'nonce' => false
);
$actions['edit'] = array(
'label' => __('Edit', 'wp-event-manager'),
'nonce' => false
);
if (is_event_cancelled($event)) {
$actions['mark_not_cancelled'] = array(
'label' => __('Mark not cancelled', 'wp-event-manager'),
'nonce' => true
);
} else {
$actions['mark_cancelled'] = array(
'label' => __('Mark cancelled', 'wp-event-manager'),
'nonce' => true
);
}
$actions['duplicate'] = array(
'label' => __('Duplicate', 'wp-event-manager'),
'nonce' => true
);
break;
case 'expired':
if (event_manager_get_permalink('submit_event_form')) {
$actions['relist'] = array(
'label' => __('Relist', 'wp-event-manager'),
'nonce' => true
);
}
break;
case 'pending_payment':
case 'pending':
if (event_manager_user_can_edit_pending_submissions()) {
$actions['edit'] = array(
'label' => __('Edit', 'wp-event-manager'),
'nonce' => false
);
}
break;
}
$actions['delete'] = array(
'label' => __('Delete', 'wp-event-manager'),
'nonce' => true
);
$actions = apply_filters('event_manager_my_event_actions', $actions, $event);
foreach ($actions as $action => $value) {
$action_url = add_query_arg(
array(
'action' => $action,
'event_id' => $event->ID
),
get_permalink($event_dashboard)
);
if ($value['nonce']) {
$action_url = wp_nonce_url($action_url, 'event_manager_my_event_actions');
} ?>