Esempio n. 1
0
<?php

/**
 * Single Event Meta (Organizer) Template
 *
 * Override this template in your own theme by creating a file at:
 * [your-theme]/tribe-events/modules/meta/details.php
 *
 * @package TribeEventsCalendar
 */
$organizer_ids = tribe_get_organizer_ids();
$multiple = count($organizer_ids) > 1;
$phone = tribe_get_organizer_phone();
$email = tribe_get_organizer_email();
$website = tribe_get_organizer_website_link();
?>

<div class="tribe-events-meta-group tribe-events-meta-group-organizer">
	<!-- h3 class="tribe-events-single-section-title"><?php 
echo tribe_get_organizer_label(!$multiple);
?>
</h3 -->
	<h3 class="tribe-events-single-section-title">Instructor</h3>
	<dl>
		<?php 
do_action('tribe_events_single_meta_organizer_section_start');
foreach ($organizer_ids as $organizer) {
    if (!$organizer) {
        continue;
    }
    ?>
 /**
  * Prints out or returns classes on an event wrapper
  *
  * @category Events
  * @param $event |0 post id or object
  * @param $echo  |true
  *
  * @return void or string
  **/
 function tribe_events_event_classes($event = 0, $echo = true)
 {
     global $post, $wp_query;
     // May be called when the global $post object does not exist - ie during ajax loads of various views
     // ... creating a dummy object allows the method to proceed semi-gracefully (interim measure only)
     //If $post object doesn't exist and an $event_id wasn't specified, then use a dummy object
     if ($event instanceof WP_Post) {
         $event_id = $event->ID;
     } elseif ($event !== 0) {
         $event_id = $event;
     } else {
         $event_id = $post->ID;
     }
     if (!$event_id) {
         return '';
     }
     $classes = array('hentry', 'vevent', 'type-tribe_events', 'post-' . $event_id, 'tribe-clearfix');
     $tribe_cat_slugs = tribe_get_event_cat_slugs($event_id);
     foreach ($tribe_cat_slugs as $tribe_cat_slug) {
         if (!empty($tribe_cat_slug)) {
             $classes[] = 'tribe-events-category-' . $tribe_cat_slug;
         }
     }
     if ($venue_id = tribe_get_venue_id($event_id)) {
         $classes[] = 'tribe-events-venue-' . $venue_id;
     }
     foreach (tribe_get_organizer_ids($event_id) as $organizer_id) {
         $classes[] = 'tribe-events-organizer-' . $organizer_id;
     }
     // added first class for css
     if ($wp_query->current_post == 0 && !tribe_is_day()) {
         $classes[] = 'tribe-events-first';
     }
     // added last class for css
     if ($wp_query->current_post == $wp_query->post_count - 1) {
         $classes[] = 'tribe-events-last';
     }
     $classes = apply_filters('tribe_events_event_classes', $classes);
     if ($echo) {
         echo implode(' ', $classes);
     } else {
         return implode(' ', $classes);
     }
 }
 /**
  * Generates and returns a set of classes for the current day
  *
  * @param  string $classes = ''
  *
  * @return string Classes
  */
 public function event_classes($classes = '')
 {
     $day = self::get_current_day();
     if (!isset($day['events'])) {
         return $classes;
     }
     $post = $day['events']->post;
     // Get our wrapper classes (for event categories, organizer, venue, and defaults)
     $classes = array();
     $tribe_cat_slugs = tribe_get_event_cat_slugs($post->ID);
     foreach ($tribe_cat_slugs as $tribe_cat_slug) {
         $classes[] = 'tribe-events-category-' . $tribe_cat_slug;
     }
     $classes = array_merge($classes, get_post_class('', $post->ID));
     if ($venue_id = tribe_get_venue_id($post->ID)) {
         $classes[] = 'tribe-events-venue-' . $venue_id;
     }
     foreach (tribe_get_organizer_ids($post->ID) as $organizer_id) {
         $classes[] = 'tribe-events-organizer-' . $organizer_id;
     }
     if ($day['events']->current_post + 1 == $day['events']->post_count) {
         $classes[] = 'tribe-events-last';
     }
     return $classes;
 }
Esempio n. 4
0
        echo esc_url($venue_web);
        ?>
" style="color:#006caa !important; display:block; margin:0; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:13px; text-decoration:underline;"><?php 
        echo $venue_web;
        ?>
</a>
															<?php 
    }
    ?>
														</td>
													</tr>
												</table>
											</td>
											<td class="ticket-organizer" valign="top" align="left" width="140" style="padding: 0 !important; width:140px; margin:0 !important;">
												<?php 
    $organizers = tribe_get_organizer_ids($event->ID);
    ?>
												<h6 style="color:#909090 !important; margin:0 0 4px 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; text-transform:uppercase; font-size:13px; font-weight:700 !important;"><?php 
    echo tribe_get_organizer_label(count($organizers) < 2);
    ?>
</h6>
												<?php 
    foreach ($organizers as $organizer_id) {
        ?>
													<span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php 
        echo tribe_get_organizer($organizer_id);
        ?>
</span>
												<?php 
    }
    ?>