} /** * Get template part (for templates in loops). * * @param string $slug * @param string $name (default: '') * @param string $template_path (default: 'gam-event-manager') * @param string|bool $default_path (default: '') False to not load a default */ function get_event_manager_template_part($slug, $name = '', $template_path = 'gam-event-manager', $default_path = '') { $template = ''; if ($name) {
break; case "event_actions": echo '<div class="actions">'; $admin_actions = apply_filters('post_row_actions', array(), $post); if (in_array($post->post_status, array('pending', 'pending_payment')) && current_user_can('publish_post', $post->ID)) { $admin_actions['approve'] = array('action' => 'approve', 'name' => __('Approve', 'gam-event-manager'), 'url' => wp_nonce_url(add_query_arg('approve_event', $post->ID), 'approve_event')); } if ($post->post_status !== 'trash') { if (current_user_can('read_post', $post->ID)) { $admin_actions['view'] = array('action' => 'view', 'name' => __('View', 'gam-event-manager'), 'url' => get_permalink($post->ID)); } if (current_user_can('edit_post', $post->ID)) { $admin_actions['edit'] = array('action' => 'edit', 'name' => __('Edit', 'gam-event-manager'), 'url' => get_edit_post_link($post->ID)); } if (current_user_can('delete_post', $post->ID)) { $admin_actions['delete'] = array('action' => 'delete', 'name' => __('Delete', 'gam-event-manager'), 'url' => get_delete_post_link($post->ID)); } } $admin_actions = apply_filters('event_manager_admin_actions', $admin_actions, $post); foreach ($admin_actions as $action) { if (is_array($action)) { printf('<a class="button button-icon tips icon-%1$s" href="%2$s" data-tip="%3$s">%4$s</a>', $action['action'], esc_url($action['url']), esc_attr($action['name']), esc_html($action['name'])); } else { echo str_replace('class="', 'class="button ', $action); } } echo '</div>'; break; } } /** * sortable_columns function.