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)); if ($value['nonce']) { $action_url = wp_nonce_url($action_url, 'event_manager_my_event_actions'); } echo '<li><a href="' . esc_url($action_url) . '" class="event-dashboard-action-' . esc_attr($action) . '">' . esc_html($value['label']) . ' </a></li>'; } ?> </ul> <?php } elseif ('event_start_date' === $key) { $timestamp = strtotime(get_event_start_date($event)); echo date("F j, Y, g:i a", $timestamp); ?> <?php } elseif ('event_end_date' === $key) { $timestamp = strtotime(get_event_end_date($event)); echo date("F j, Y, g:i a", $timestamp); ?> <?php } elseif ('event_location' === $key) { if (get_event_location($event) == 'Anywhere') { echo 'Online Event'; } else { display_event_location(false, $event); }
* @return void */ function get_event_location($post = null) { $post = get_post($post); if ($post->post_type !== 'event_listing') { return; } return apply_filters('display_event_location', $post->_event_location, $post); } /** * display_event_location function. * @param boolean $map_link whether or not to link to the map on google maps