コード例 #1
0
		<?php 
}
?>

		<?php 
do_action('eventorganiser_additional_event_meta');
?>

	</ul>

	<!-- Does the event have a venue? -->
	<?php 
if (eo_get_venue()) {
    ?>
		<!-- Display map -->
		<div class="eo-event-venue-map">
			<?php 
    echo eo_get_venue_map(eo_get_venue(), array('width' => '100%'));
    ?>
		</div>
	<?php 
}
?>


	<div style="clear:both"></div>

	<hr>

</div><!-- .entry-meta -->
コード例 #2
0
ファイル: taxonomy-event-venue.php プロジェクト: blogfor/king
?>
		
		<h1 class="page-title"><?php 
printf(__('Events at: %s', 'eventorganiser'), '<span>' . eo_get_venue_name($venue_id) . '</span>');
?>
</h1>

		<?php 
if ($venue_description = eo_get_venue_description($venue_id)) {
    echo '<div class="venue-archive-meta">' . $venue_description . '</div>';
}
?>
		
		<!-- Display the venue map. If you specify a class, ensure that class has height/width dimensions-->
		<?php 
echo eo_get_venue_map($venue_id, array('width' => "100%"));
?>
	</header><!-- end header -->

	<?php 
if (have_posts()) {
    ?>

		<!-- Navigate between pages -->
		<!-- In TwentyEleven theme this is done by twentyeleven_content_nav -->
		<?php 
    if ($wp_query->max_num_pages > 1) {
        ?>
				<nav id="nav-above">
					<div class="nav-next events-nav-newer"><?php 
        next_posts_link(__('Later events <span class="meta-nav">&rarr;</span>', 'eventorganiser'));
コード例 #3
0
printf(__('Galas at %s', 'eventorganiser'), '<span>' . eo_get_venue_name($venue_id) . '</span>');
?>
                </h2>
                
                <hr>
            
                <?php 
if ($venue_description = eo_get_venue_description($venue_id)) {
    echo '<div class="venue-archive-meta">' . $venue_description . '</div>';
}
?>
        
                <!-- Display the venue map. If you specify a class, ensure that class has height/width dimensions-->
                <?php 
if (eo_venue_has_latlng($venue_id)) {
    echo eo_get_venue_map($venue_id, array('width' => '100%'));
}
?>
                
                <hr>
                             
            <?php 
eo_get_template_part('eo-loop-events');
//Lists the events
?>
            </div>
        
        </div><!-- #primary -->
        
        <!-- Call template sidebar and footer -->
        <div class="col-md-4"><?php 
コード例 #4
0
 static function parse_template($matches)
 {
     global $post;
     $replacement = '';
     switch ($matches[1]) {
         case 'event_title':
             $replacement = get_the_title();
             break;
         case 'start':
         case 'end':
         case 'schedule_start':
         case 'schedule_last':
         case 'schedule_end':
             switch (count($matches)) {
                 case 2:
                     $dateFormat = get_option('date_format');
                     $dateTime = get_option('time_format');
                     break;
                 case 3:
                     $dateFormat = self::eo_clean_input($matches[2]);
                     $dateTime = '';
                     break;
                 case 5:
                     $dateFormat = self::eo_clean_input($matches[3]);
                     $dateTime = self::eo_clean_input($matches[4]);
                     break;
             }
             $format = eo_is_all_day(get_the_ID()) ? $dateFormat : $dateFormat . $dateTime;
             switch ($matches[1]) {
                 case 'start':
                     $replacement = eo_get_the_start($format);
                     break;
                 case 'end':
                     $replacement = eo_get_the_end($format);
                     break;
                 case 'schedule_start':
                     $replacement = eo_get_schedule_start($format);
                     break;
                 case 'schedule_last':
                 case 'schedule_end':
                     $replacement = eo_get_schedule_end($format);
                     break;
             }
             break;
         case 'event_duration':
             $start = eo_get_the_start(DATETIMEOBJ);
             $end = clone eo_get_the_end(DATETIMEOBJ);
             if (eo_is_all_day()) {
                 $end->modify('+1 minute');
             }
             if (function_exists('date_diff')) {
                 $duration = date_diff($start, $end);
                 $replacement = $duration->format($matches[2]);
             } else {
                 $replacement = eo_date_interval($start, $end, $matches[2]);
             }
             $replacement = false;
             break;
         case 'event_tags':
             $replacement = get_the_term_list(get_the_ID(), 'event-tag', '', ', ', '');
             break;
         case 'event_cats':
             $replacement = get_the_term_list(get_the_ID(), 'event-category', '', ', ', '');
             break;
         case 'event_venue':
             $replacement = eo_get_venue_name();
             break;
         case 'event_venue_map':
             if (eo_get_venue()) {
                 $class = isset($matches[2]) ? self::eo_clean_input($matches[2]) : '';
                 $class = !empty($class) ? 'class=' . $class : '';
                 $replacement = eo_get_venue_map(eo_get_venue(), compact('class'));
             }
             break;
         case 'event_venue_url':
             $venue_link = eo_get_venue_link();
             $replacement = !is_wp_error($venue_link) ? $venue_link : '';
             break;
         case 'event_venue_address':
             $address = eo_get_venue_address();
             $replacement = $address['address'];
             break;
         case 'event_venue_postcode':
             $address = eo_get_venue_address();
             $replacement = $address['postcode'];
             break;
         case 'event_venue_city':
             $address = eo_get_venue_address();
             $replacement = $address['city'];
             break;
         case 'event_venue_country':
             $address = eo_get_venue_address();
             $replacement = $address['country'];
             break;
         case 'event_venue_state':
             $address = eo_get_venue_address();
             $replacement = $address['state'];
             break;
         case 'event_venue_city':
             $address = eo_get_venue_address();
             $replacement = $address['city'];
             break;
         case 'event_thumbnail':
             $size = isset($matches[2]) ? self::eo_clean_input($matches[2]) : '';
             $size = !empty($size) ? $size : 'thumbnail';
             $attr = isset($matches[3]) ? self::eo_clean_input($matches[3]) : '';
             //Decode HTML entities as shortcode encodes them
             $attr = html_entity_decode($attr);
             $replacement = get_the_post_thumbnail(get_the_ID(), $size, $attr);
             break;
         case 'event_url':
             $replacement = get_permalink();
             break;
         case 'event_custom_field':
             $field = $matches[2];
             $meta = get_post_meta(get_the_ID(), $field);
             $replacement = implode($meta);
             break;
         case 'event_excerpt':
             $length = isset($matches[2]) ? intval($matches[2]) : 55;
             //Using get_the_excerpt adds a link....
             if (post_password_required($post)) {
                 $output = __('There is no excerpt because this is a protected post.');
             } else {
                 $output = $post->post_excerpt;
             }
             $replacement = eventorganiser_trim_excerpt($output, $length);
             break;
         case 'event_content':
             $replacement = get_the_content();
             break;
         case 'cat_color':
             $replacement = eo_get_event_color();
             break;
         case 'event_title_attr':
             $replacement = get_the_title();
             break;
     }
     return $replacement;
 }