/**
  * 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.
  */
 public static function custom_recurrence_description($meta_id)
 {
     global $_tribe_meta_factory;
     $post_id = get_the_ID();
     $recurrence_meta = Tribe__Events__Pro__Recurrence_Meta::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__Events__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);
 }
Ejemplo n.º 2
0
    /**
     * Outputs recurrence data in JSON format when localize script won't work
     *
     * @param int $post_id Post ID of event
     */
    public static function output_recurrence_json_data($post_id)
    {
        // convert array to variables that can be used in the view
        $recurrence = Tribe__Events__Pro__Recurrence_Meta::getRecurrenceMeta($post_id);
        ?>
		<script>
		var tribe_events_pro_recurrence_data = <?php 
        echo json_encode($recurrence);
        ?>
;
		</script>
		<?php 
    }