<tr> <td><?php echo TribeCommunityEvents::instance()->getEventStatusIcon($post->post_status); ?> </td> <td> <?php $canEdit = current_user_can('edit_post', $post->ID); $canDelete = current_user_can('delete_post', $post->ID); if ($canEdit) { ?> <span class="title"> <a href="<?php echo tribe_community_events_edit_event_link($post->ID); ?> "><?php echo $post->post_title; ?> </a> </span> <?php } else { echo $post->post_title; } ?> <div class="row-actions"> <span class="view"> <a href="<?php echo tribe_get_event_link($post);
if (isset($icons[$post->post_status])) { echo wpv_shortcode_icon(array('name' => $icons[$post->post_status], 'size' => 16)); } else { echo TribeCommunityEvents::instance()->getEventStatusIcon($post->post_status); } ?> </td> <td> <?php $canEdit = current_user_can('edit_post', $post->ID); $canDelete = current_user_can('delete_post', $post->ID); if ($canEdit) { ?> <span class="title"> <a href="<?php echo esc_url(tribe_community_events_edit_event_link($post->ID)); ?> "><?php echo esc_html($post->post_title); ?> </a> </span> <?php } else { echo esc_html($post->post_title); } ?> <div class="row-actions"> <span class="view"> <a href="<?php echo esc_url(tribe_get_event_link($post));
private function get_view_edit_links($event_id) { $view_link = $edit_link = ''; if (get_post_status($event_id) == 'publish' || current_user_can('edit_post', $event_id)) { $view_link = sprintf('<a href="%s" class="view-event">%s</a>', get_permalink($event_id), __('View', 'tribe-events-community')); } if (current_user_can('edit_post', $event_id)) { $edit_link = sprintf('<a href="%s" class="edit-event">%s</a>', tribe_community_events_edit_event_link($event_id), 'Edit'); } if (empty($view_link) && empty($edit_link)) { return ''; } if (!empty($view_link) && !empty($edit_link)) { $separator = '<span class="sep"> | </span>'; return ' (' . $view_link . $separator . $edit_link . ')'; } return ' (' . $view_link . $edit_link . ')'; }