/**
  * Includes the tickets metabox inside the Event edit screen
  *
  * @param $post_id
  */
 public function do_meta_box($post_id)
 {
     $startMinuteOptions = Tribe__Events__View_Helpers::getMinuteOptions(null);
     $endMinuteOptions = Tribe__Events__View_Helpers::getMinuteOptions(null);
     $startHourOptions = Tribe__Events__View_Helpers::getHourOptions(null, true);
     $endHourOptions = Tribe__Events__View_Helpers::getHourOptions(null, false);
     $startMeridianOptions = Tribe__Events__View_Helpers::getMeridianOptions(null, true);
     $endMeridianOptions = Tribe__Events__View_Helpers::getMeridianOptions(null);
     $tickets = Tribe__Events__Tickets__Tickets::get_event_tickets($post_id);
     include $this->path . 'src/admin-views/tickets/meta-box.php';
 }
 protected function set_end_date_time()
 {
     $this->vars['endMinuteOptions'] = Tribe__Events__View_Helpers::getMinuteOptions($this->vars['_EventEndDate']);
     $this->vars['endHourOptions'] = Tribe__Events__View_Helpers::getHourOptions($this->vars['_EventAllDay'] == 'yes' ? null : $this->vars['_EventEndDate']);
     $this->vars['endMeridianOptions'] = Tribe__Events__View_Helpers::getMeridianOptions($this->vars['_EventEndDate']);
     $datepicker_format = Tribe__Events__Date_Utils::datepicker_formats(tribe_get_option('datepickerFormat'));
     if ($this->vars['_EventEndDate']) {
         $end = Tribe__Events__Date_Utils::date_only($this->vars['_EventEndDate'], false, $datepicker_format);
     }
     // If we don't have a valid end date, assume today's date
     $this->vars['EventEndDate'] = isset($end) && $end ? $end : date($datepicker_format);
 }
<?php

$start_hour_options = Tribe__Events__View_Helpers::getHourOptions(null, true);
$start_minute_options = Tribe__Events__View_Helpers::getMinuteOptions(null, true);
$start_meridian_options = Tribe__Events__View_Helpers::getMeridianOptions(null, true);
$end_hour_options = Tribe__Events__View_Helpers::getHourOptions(null, false);
$end_minute_options = Tribe__Events__View_Helpers::getMinuteOptions(null, false);
$end_meridian_options = Tribe__Events__View_Helpers::getMeridianOptions(null, false);
?>
<tr class="recurrence-row">
	<td class="recurrence-rules-header"><?php 
esc_html_e('Recurrence Rules:', 'tribe-events-calendar-pro');
?>
</td>
	<td>
		<div id="tribe-recurrence-staging"></div>
		<script type="text/x-handlebars-template" id="tmpl-tribe-recurrence">
			<div class="tribe-event-recurrence tribe-event-recurrence-rule">
				<div class="tribe-handle" title="Click to toggle"></div>
				<input type="hidden" name="is_recurring[]" data-field="is_recurring" value="{{#if is_recurring}}true{{else}}false{{/if}}"/>
				<select name="recurrence[rules][][type]" data-field="type" data-single="<?php 
esc_attr_e('event', 'tribe-events-calendar-pro');
?>
" data-plural="<?php 
esc_attr_e('events', 'tribe-events-calendar-pro');
?>
">
					{{#tribe_recurrence_select type}}
						<option value="None"><?php 
esc_html_e('Once', 'tribe-events-calendar-pro');
?>
<?php

$start_hour_options = Tribe__Events__View_Helpers::getHourOptions(null, true);
$start_minute_options = Tribe__Events__View_Helpers::getMinuteOptions(null, true);
$start_meridian_options = Tribe__Events__View_Helpers::getMeridianOptions(null, true);
?>
<tr class="recurrence-row">
	<td class="recurrence-rules-header"><?php 
esc_html_e('Recurrence Rules:', 'tribe-events-calendar-pro');
?>
</td>
	<td>
		<div id="tribe-recurrence-staging"></div>
		<script type="text/x-handlebars-template" id="tmpl-tribe-recurrence">
			<div class="tribe-event-recurrence tribe-event-recurrence-rule">
				<div class="tribe-handle" title="Click to toggle"></div>
				<input type="hidden" name="is_recurring[]" data-field="is_recurring" value="{{#if is_recurring}}true{{else}}false{{/if}}"/>
				<select name="recurrence[rules][][type]" data-field="type" data-single="<?php 
esc_attr_e('event', 'tribe-events-calendar-pro');
?>
" data-plural="<?php 
esc_attr_e('events', 'tribe-events-calendar-pro');
?>
">
					{{#tribe_recurrence_select type}}
						<option value="None"><?php 
esc_html_e('Once', 'tribe-events-calendar-pro');
?>
</option>
						<option value="Every Day"><?php 
esc_html_e('Every Day', 'tribe-events-calendar-pro');
Example #5
0
 protected function set_end_date_time()
 {
     $this->vars['endMinuteOptions'] = Tribe__Events__View_Helpers::getMinuteOptions($this->vars['_EventEndDate']);
     $this->vars['endHourOptions'] = Tribe__Events__View_Helpers::getHourOptions($this->vars['_EventAllDay'] == 'yes' ? null : $this->vars['_EventEndDate']);
     $this->vars['endMeridianOptions'] = Tribe__Events__View_Helpers::getMeridianOptions($this->vars['_EventEndDate']);
     if ($this->vars['_EventEndDate']) {
         $end = Tribe__Events__Date_Utils::dateOnly($this->vars['_EventEndDate']);
     }
     // If we don't have a valid end date, assume today's date
     $this->vars['EventEndDate'] = isset($end) && $end ? $end : date('Y-m-d');
 }