query_vars['post_type'] == EM_POST_TYPE_EVENT || $wp_query->query_vars['post_type'] == 'event-recurring' ){ ?> '; echo ''; foreach ($terms as $term) { // output each select option line, check against the last $_GET to show the current option selected $selected = (!empty($_GET[EM_TAXONOMY_CATEGORY]) && $_GET[EM_TAXONOMY_CATEGORY] == $term->slug) ? 'selected="selected"':''; echo ''; } echo ""; } if( !empty($_REQUEST['author']) ){ ?> __('Location'), 'date-time' => __('Date and Time'), 'author' => __('Owner','dbem'), 'extra' => '' )); if( !get_option('dbem_locations_enabled') ){ unset($columns['location']); } return $columns; } function columns_output( $column ) { global $post, $EM_Event; $EM_Event = em_get_event($post, 'post_id'); /* @var $post EM_Event */ switch ( $column ) { case 'location': //get meta value to see if post has location, otherwise $EM_Location = $EM_Event->get_location(); if( !empty($EM_Location->location_id) ){ echo "" . $EM_Location->location_name . "
" . $EM_Location->location_address . " - " . $EM_Location->location_town; }else{ echo __('None','dbem'); } break; case 'date-time': //get meta value to see if post has location, otherwise $localised_start_date = date_i18n('D d M Y', $EM_Event->start); $localised_end_date = date_i18n('D d M Y', $EM_Event->end); echo $localised_start_date; echo ($localised_end_date != $localised_start_date) ? " - $localised_end_date":''; echo "
"; if(!$EM_Event->event_all_day){ echo substr ( $EM_Event->start_time, 0, 5 ) . " - " . substr ( $EM_Event->end_time, 0, 5 ); }else{ echo get_option('dbem_event_all_day_message'); } break; case 'extra': if( get_option('dbem_rsvp_enabled') == 1 && !empty($EM_Event->event_rsvp) && $EM_Event->can_manage('manage_bookings','manage_others_bookings')){ ?> : get_bookings()->get_booked_spaces()."/".$EM_Event->get_spaces(); ?> | : get_bookings()->get_pending_spaces(); ?> is_recurrence()) ? '
':''; } if ( $EM_Event->is_recurrence() && $EM_Event->can_manage('edit_recurring_events','edit_others_recurring_events') ) { $recurrence_delete_confirm = __('WARNING! You will delete ALL recurrences of this event, including booking history associated with any event in this recurrence. To keep booking information, go to the relevant single event and save it to detach it from this recurrence series.','dbem'); ?> get_recurrence_description(); ?>
| |
post_type == EM_POST_TYPE_EVENT){ global $post, $EM_Event; $EM_Event = em_get_event($post, 'post_id'); $actions['duplicate'] = ''.__('Duplicate','dbem').''; } return $actions; } } add_action('admin_init', array('EM_Event_Posts_Admin','init')); /* * Recurring Events */ class EM_Event_Recurring_Posts_Admin{ function init(){ global $pagenow; if( $pagenow == 'edit.php' && !empty($_REQUEST['post_type']) && $_REQUEST['post_type'] == 'event-recurring' ){ add_action('admin_notices',array('EM_Event_Recurring_Posts_Admin','admin_notices')); add_action('admin_head', array('EM_Event_Recurring_Posts_Admin','admin_head')); //collumns add_filter('manage_edit-event-recurring_columns' , array('EM_Event_Recurring_Posts_Admin','columns_add')); add_filter('manage_posts_custom_column' , array('EM_Event_Recurring_Posts_Admin','columns_output'),10,1 ); add_action('restrict_manage_posts', array('EM_Event_Posts_Admin','restrict_manage_posts')); } } function admin_notices(){ $warning = sprintf(__( 'Modifications to these events will cause all recurrences of each event to be deleted and recreated and previous bookings will be deleted! You can edit individual recurrences and detach them from recurring events by visiting the events page.', 'dbem' ), admin_url().'edit.php?post_type='.EM_POST_TYPE_EVENT); ?>

__('Location'), 'date-time' => __('Date and Time'), 'author' => __('Owner','dbem'), )); } function columns_output( $column ) { global $post, $EM_Event; if( $post->post_type == 'event-recurring' ){ $post = $EM_Event = em_get_event($post); /* @var $post EM_Event */ switch ( $column ) { case 'location': //get meta value to see if post has location, otherwise $EM_Location = $EM_Event->get_location(); if( !empty($EM_Location->location_id) ){ echo "" . $EM_Location->location_name . "
" . $EM_Location->location_address . " - " . $EM_Location->location_town; }else{ echo __('None','dbem'); } break; case 'date-time': echo $EM_Event->get_recurrence_description(); break; } } } } add_action('admin_init', array('EM_Event_Recurring_Posts_Admin','init'));