</select> <select tabindex="<?php tribe_events_tab_index(); ?> " name="recurrence[<?php echo esc_attr($rule_type); ?> ][][custom][start-time][minute]" data-field="custom-start-time-minute"> {{#tribe_recurrence_select custom.[start-time].minute}} <?php echo $start_minute_options; ?> {{/tribe_recurrence_select}} </select> <?php if (!Tribe__Events__View_Helpers::is_24hr_format()) { ?> <select tabindex="<?php tribe_events_tab_index(); ?> " name="recurrence[<?php echo esc_attr($rule_type); ?> ][][custom][start-time][meridian]" data-field="custom-start-time-meridian"> {{#tribe_recurrence_select custom.[start-time].meridian}} <?php echo $start_meridian_options; ?> {{/tribe_recurrence_select}} </select> <?php
tribe_events_tab_index(); ?> " id="StateProvinceText" name="venue[Province]" type='text' name='' size='25' value='<?php echo esc_attr($currentProvince); ?> ' /> <select class="chosen" tabindex="<?php tribe_events_tab_index(); ?> " id="StateProvinceSelect" name="venue[State]"> <option value=""><?php esc_html_e('Select a State:', 'the-events-calendar'); ?> </option> <?php foreach (Tribe__Events__View_Helpers::loadStates() as $abbr => $fullname) { echo '<option value="' . esc_attr($abbr) . '"'; selected(($_VenueStateProvince != -1 ? $_VenueStateProvince : $currentState) == $abbr); echo '>' . esc_html($fullname) . '</option>'; } ?> </select> </td> </tr> <tr class="venue"> <td class='tribe-table-field-label'><?php esc_html_e('Postal Code:', 'the-events-calendar'); ?> </td> <td>
/** * 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'; }
/** * Builds a set of options for displaying a year chooser * * @param string $date the current date (optional) * * @return string a set of HTML options with adjacent years (current year selected) * @deprecated * @todo remove in 3.10 */ public static function getYearOptions($date = "") { _deprecated_function(__CLASS__ . '::' . __FUNCTION__ . '()', '3.8'); $years = Tribe__Events__View_Helpers::years(); $options = ''; if (empty($date)) { $year = date_i18n('Y'); if (date_i18n('n') == 12 && date_i18n('j') == 31) { $year++; } } else { $year = date('Y', strtotime($date)); } foreach ($years as $yearText) { if ($year == $yearText) { $selected = 'selected="selected"'; } else { $selected = ''; } $options .= "<option value='{$yearText}' {$selected}>{$yearText}</option>\n"; } return $options; }
/** * Gets the full region name of a given event's Venue address. * * @param int $event_id * * @return string The full region for this event's address. */ function tribe_get_full_region($event_id) { $province = tribe_get_event_meta($event_id, '_VenueStateProvince', true); $states = Tribe__Events__View_Helpers::loadStates(); $full_region = isset($states[$province]) ? $states[$province] : $province; return apply_filters('tribe_get_full_region', $full_region); }
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); }
</label><br /><?php printf(__('The current default value is <strong>%s</strong>', 'tribe-events-calendar-pro'), tribe_get_option('eventsDefaultZip')); ?> </fieldset> </td> </tr> <tr class="venue-default-info"> <th scope="row"><?php esc_html_e('Default Country for Events', 'tribe-events-calendar-pro'); ?> </th> <td> <select class="chosen" name="defaultCountry" id="defaultCountry"> <?php $countries = Tribe__Events__View_Helpers::constructCountries(); $defaultCountry = tribe_get_option('defaultCountry'); foreach ($countries as $abbr => $fullname) { ?> <option value="<?php echo esc_attr($fullname); ?> " <?php selected($fullname, empty($defaultCountry[1]) ? '' : $defaultCountry[1]); ?> ><?php echo $fullname; ?> </option> <?php }
<?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');
<?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'); ?>
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'); }