/**
  * Responsible for displaying a user's custom recurrence pattern description.
  *
  * @deprecated since 3.6
  * @param string $meta_id The meta group this is in.
  * @return string The custom description.
  * @author Timothy Wood
  * @since 3.0
  */
 public static function custom_recurrence_description($meta_id)
 {
     global $_tribe_meta_factory;
     $post_id = get_the_ID();
     $recurrence_meta = TribeEventsRecurrenceMeta::getRecurrenceMeta($post_id);
     $recurrence_description = !empty($recurrence_meta['recCustomRecurrenceDescription']) ? $recurrence_meta['recCustomRecurrenceDescription'] : tribe_get_recurrence_text($post_id);
     $html = tribe_is_recurring_event($post_id) ? Tribe_Meta_Factory::template($_tribe_meta_factory->meta[$meta_id]['label'], $recurrence_description, $meta_id) : '';
     return apply_filters('tribe_event_pro_meta_custom_recurrence_description', $html);
 }
Пример #2
0
 /**
  * show the recurring event info in a tooltip
  *
  * return the details of the start/end date/time
  *
  * @since  3.0
  * @param int     $post_id
  * @return string
  */
 function tribe_events_event_recurring_info_tooltip($post_id = null)
 {
     if (is_null($post_id)) {
         $post_id = get_the_ID();
     }
     $tooltip = '';
     if (class_exists('TribeEventsPro')) {
         // should this be a template tag?
         if (tribe_is_recurring_event($post_id)) {
             $tooltip .= '<div class="recurringinfo">';
             $tooltip .= '<div class="event-is-recurring">';
             $tooltip .= '<span class="tribe-events-divider">|</span>';
             $tooltip .= __('Recurring Event', 'tribe-events-calendar');
             $tooltip .= sprintf(' <a href="%s">%s</a>', tribe_all_occurences_link($post_id, false), __('(See all)', 'tribe-events-calendar'));
             $tooltip .= '<div id="tribe-events-tooltip-' . $post_id . '" class="tribe-events-tooltip recurring-info-tooltip">';
             $tooltip .= '<div class="tribe-events-event-body">';
             $tooltip .= tribe_get_recurrence_text($post_id);
             $tooltip .= '</div>';
             $tooltip .= '<span class="tribe-events-arrow"></span>';
             $tooltip .= '</div>';
             $tooltip .= '</div>';
             $tooltip .= '</div>';
         }
     }
     return apply_filters('tribe_events_event_recurring_info_tooltip', $tooltip);
 }
Пример #3
0
 /**
  * show the recurring event info in a tooltip
  *
  * return the details of the start/end date/time
  *
  * @param int     $post_id
  *
  * @return string
  * @todo remove tribe_events_event_recurring_info_tooltip filter in 3.11
  */
 function tribe_events_recurrence_tooltip($post_id = null)
 {
     if (empty($post_id)) {
         $post_id = get_the_ID();
     }
     $tooltip = '';
     if (tribe_is_recurring_event($post_id)) {
         $tooltip .= '<div class="recurringinfo">';
         $tooltip .= '<div class="event-is-recurring">';
         $tooltip .= '<span class="tribe-events-divider">|</span>';
         $tooltip .= sprintf(__('Recurring %s', 'tribe-events-calendar-pro'), tribe_get_event_label_singular());
         $tooltip .= sprintf(' <a href="%s">%s</a>', esc_url(tribe_all_occurences_link($post_id, false)), __('(See all)', 'tribe-events-calendar-pro'));
         $tooltip .= '<div id="tribe-events-tooltip-' . $post_id . '" class="tribe-events-tooltip recurring-info-tooltip">';
         $tooltip .= '<div class="tribe-events-event-body">';
         $tooltip .= tribe_get_recurrence_text($post_id);
         $tooltip .= '</div>';
         $tooltip .= '<span class="tribe-events-arrow"></span>';
         $tooltip .= '</div>';
         $tooltip .= '</div>';
         $tooltip .= '</div>';
     }
     if (has_filter('tribe_events_event_recurring_info_tooltip')) {
         _deprecated_function("The 'tribe_get_related_events' filter", '3.9', " the 'tribe_events_recurrence_tooltip' filter");
         $tooltip = apply_filters('tribe_events_event_recurring_info_tooltip', $tooltip);
         // for backwards-compat, will be removed
     }
     return apply_filters('tribe_events_recurrence_tooltip', $tooltip);
 }
Пример #4
0
?>
</dt>
		<dd class="event-meta event-meta-updated"><span class="date updated"><?php 
the_date();
?>
</span></dd>
		
		<?php 
if (class_exists('TribeEventsRecurrenceMeta') && function_exists('tribe_get_recurrence_text') && tribe_is_recurring_event()) {
    ?>
			<dt class="event-label event-label-schedule"><?php 
    _e('Schedule:', 'tribe-events-calendar');
    ?>
</dt>
         <dd class="event-meta event-meta-schedule"><?php 
    echo tribe_get_recurrence_text();
    ?>
            <?php 
    if (class_exists('TribeEventsRecurrenceMeta') && function_exists('tribe_all_occurences_link')) {
        ?>
(<a href='<?php 
        tribe_all_occurences_link();
        ?>
'>See all</a>)<?php 
    }
    ?>
         </dd>
		<?php 
}
?>
Пример #5
0
 /**
  * show the recurring event info in a tooltip
  *
  * return the details of the start/end date/time
  *
  * @since  3.5
  * @param int     $post_id
  * @return string
  */
 function tribe_events_recurrence_tooltip($post_id = null)
 {
     if (empty($post_id)) {
         $post_id = get_the_ID();
     }
     $tooltip = '';
     if (tribe_is_recurring_event($post_id)) {
         $tooltip .= '<div class="recurringinfo">';
         $tooltip .= '<div class="event-is-recurring">';
         $tooltip .= '<span class="tribe-events-divider">|</span>';
         $tooltip .= __('Recurring Event', 'tribe-events-calendar');
         $tooltip .= sprintf(' <a href="%s">%s</a>', tribe_all_occurences_link($post_id, false), __('(See all)', 'tribe-events-calendar'));
         $tooltip .= '<div id="tribe-events-tooltip-' . $post_id . '" class="tribe-events-tooltip recurring-info-tooltip">';
         $tooltip .= '<div class="tribe-events-event-body">';
         $tooltip .= tribe_get_recurrence_text($post_id);
         $tooltip .= '</div>';
         $tooltip .= '<span class="tribe-events-arrow"></span>';
         $tooltip .= '</div>';
         $tooltip .= '</div>';
         $tooltip .= '</div>';
     }
     $tooltip = apply_filters('tribe_events_event_recurring_info_tooltip', $tooltip);
     // for backwards-compat, will be removed
     return apply_filters('tribe_events_recurrence_tooltip', $tooltip);
 }