public static function render_single_event_title()
    {
        $event_id = get_the_ID();
        ?>
		<div class="fusion-events-single-title-content">
			<?php 
        the_title('<h2 class="tribe-events-single-event-title summary entry-title">', '</h2>');
        ?>

			<div class="tribe-events-schedule updated published tribe-clearfix">
				<?php 
        echo tribe_events_event_schedule_details($event_id, '<h3>', '</h3>');
        ?>
				<?php 
        if (tribe_get_cost()) {
            ?>
					<span class="tribe-events-divider">|</span>
					<span class="tribe-events-cost"><?php 
            echo tribe_get_cost(null, true);
            ?>
</span>
				<?php 
        }
        ?>
			</div>
		</div>
		<?php 
    }
コード例 #2
0
ファイル: events_upcoming.php プロジェクト: erynet/SUAWEBv2
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('categories' => "", 'items' => "3", 'paginate' => "no"), $atts, $this->config['shortcode']);
     $output = "";
     $posts = $this->query_entries($atts);
     $entries = $posts->posts;
     if (!empty($entries)) {
         $output .= "<div class='av-upcoming-events " . $meta['el_class'] . "'>";
         foreach ($entries as $entry) {
             $class = "av-upcoming-event-entry";
             $image = get_the_post_thumbnail($entry->ID, 'square', array('class' => 'av-upcoming-event-image'));
             $class .= empty($image) ? " av-upcoming-event-with-image" : " av-upcoming-event-without-image";
             $title = get_the_title($entry->ID);
             $link = get_permalink($entry->ID);
             $price = tribe_get_cost($entry->ID, true);
             $venue = tribe_get_venue($entry->ID);
             $output .= "<a href='{$link}' class='{$class}'>";
             if ($image) {
                 $output .= $image;
             }
             $output .= "<div class='av-upcoming-event-data'>";
             $output .= "<h4 title='av-upcoming-event-title'>{$title}</h4>";
             $output .= "<div class='av-upcoming-event-meta'>";
             $output .= "<span class='av-upcoming-event-schedule'>" . tribe_events_event_schedule_details($entry) . "</span>";
             if ($price) {
                 $output .= "<span class='av-upcoming-event-cost'>{$price}</span>";
             }
             if ($price && $venue) {
                 $output .= " - ";
             }
             if ($venue) {
                 $output .= "<span class='av-upcoming-event-venue'>{$venue}</span>";
             }
             $output .= apply_filters('avf_upcoming_event_extra_data', "", $entry);
             $output .= "</div>";
             $output .= "</div>";
             $output .= "</a>";
         }
         if ($atts['paginate'] == "yes" && ($avia_pagination = avia_pagination($posts->max_num_pages, 'nav'))) {
             $output .= "<div class='pagination-wrap pagination-" . TribeEvents::POSTTYPE . "'>{$avia_pagination}</div>";
         }
         $output .= "</div>";
     }
     return $output;
 }
コード例 #3
0
 /**
  * Fetches the JSON-LD data for this type of object
  *
  * @param  int|WP_Post|null $post The post/event
  * @param  array  $args
  * @return array
  */
 public function get_data($posts = null, $args = array())
 {
     $posts = $posts instanceof WP_Post ? array($posts) : (array) $posts;
     $return = array();
     foreach ($posts as $i => $post) {
         $data = parent::get_data($post, $args);
         // If we have an Empty data we just skip
         if (empty($data)) {
             continue;
         }
         // Fetch first key
         $post_id = key($data);
         // Fetch first Value
         $data = reset($data);
         $event_tz_string = get_post_meta($post_id, '_EventTimezone', true);
         $tz_mode = tribe_get_option('tribe_events_timezone_mode', 'event');
         $tz_string = $event_tz_string && $tz_mode === 'event' ? $event_tz_string : Tribe__Events__Timezones::wp_timezone_string();
         $data->startDate = Tribe__Events__Timezones::to_utc(tribe_get_start_date($post_id, true, Tribe__Date_Utils::DBDATETIMEFORMAT), $tz_string, 'c');
         $data->endDate = Tribe__Events__Timezones::to_utc(tribe_get_end_date($post_id, true, Tribe__Date_Utils::DBDATETIMEFORMAT), $tz_string, 'c');
         if (tribe_has_venue($post_id)) {
             $venue_id = tribe_get_venue_id($post_id);
             $venue_data = Tribe__Events__JSON_LD__Venue::instance()->get_data($venue_id);
             $data->location = reset($venue_data);
         }
         if (tribe_has_organizer($post_id)) {
             $organizer_id = tribe_get_organizer_id($post_id);
             $organizer_data = Tribe__Events__JSON_LD__Organizer::instance()->get_data($organizer_id);
             $data->organizer = reset($organizer_data);
         }
         $price = tribe_get_cost($post_id);
         $price = $this->normalize_price($price);
         if ('' !== $price) {
             // Manually Include the Price for non Event Tickets
             $data->offers = (object) array('@type' => 'Offer', 'price' => $price, 'url' => $data->url);
         }
         $return[$post_id] = $data;
     }
     return $return;
 }
コード例 #4
0
 /**
  * @deprecated
  */
 function sp_get_cost($postId = null)
 {
     _deprecated_function(__FUNCTION__, '2.0', 'tribe_get_cost()');
     return tribe_get_cost($postId);
 }
コード例 #5
0
ファイル: list.php プロジェクト: sonijoy/my_repo
                ?>
</a>
						<?php 
            }
            ?>
</td>
						<td class="tribe-events-event-meta-value"><?php 
            echo tribe_get_full_address(get_the_ID());
            ?>
</td>
					</tr>
					<?php 
        }
        ?>
					<?php 
        $cost = tribe_get_cost();
        if (!empty($cost)) {
            ?>
					<tr>
						<td class="tribe-events-event-meta-desc"><?php 
            _e('Cost:', 'tribe-events-calendar');
            ?>
</td>
						<td class="tribe-events-event-meta-value" itemprop="price"><?php 
            echo $cost;
            ?>
</td>
					 </tr>
					<?php 
        }
        ?>
コード例 #6
0
ファイル: cost.php プロジェクト: donwea/nhap.org
				<input type='text' id="EventCurrencySymbol" name="EventCurrencySymbol" size="2" value="<?php 
tribe_community_events_form_currency_symbol();
?>
" />
			</td>
		</tr>
		<tr>
			<td>
				<label for="EventCost">
					<?php 
_e('Cost:', 'tribe-events-calendar');
?>
				</label>
			</td>
			<td><input type='text' id="EventCost" name="EventCost" size="6" value="<?php 
echo isset($_POST['EventCost']) ? esc_attr($_POST['EventCost']) : tribe_get_cost();
?>
" /></td>
		</tr>
		<tr>
			<td></td>
			<td><small><?php 
_e('Leave blank to hide the field. Enter a 0 for events that are free.', 'tribe-events-calendar');
?>
</small></td>
		</tr>

	</table><!-- #event_cost -->

</div><!-- .tribe-events-community-details -->
コード例 #7
0
 /**
  * Returns the cost with the formatting flag set to true.
  */
 public function tribe_get_cost()
 {
     return tribe_get_cost(null, true);
 }
コード例 #8
0
        echo tribe_get_event_link();
        ?>
"><?php 
        echo get_the_title(get_the_ID());
        ?>
</a></h4>
				<?php 
        echo tribe_events_event_schedule_details();
        ?>
				<?php 
        if (tribe_get_cost(get_the_ID()) != '') {
            ?>
				<span class="tribe-events-divider">|</span>
					<span class="tribe-events-event-cost">
						<?php 
            echo tribe_get_cost(get_the_ID(), true);
            ?>
					</span>
				<?php 
        }
        ?>
			</li>
	<?php 
    }
    ?>
	</ul>
	<?php 
    do_action('tribe_events_venue_widget_after_the_list');
    ?>
	<?php 
}
コード例 #9
0
<div id="tribe-events-content" class="tribe-events-single vevent hentry">

	<p class="tribe-events-back">
		<a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> <?php printf( __( '&laquo; All %s', 'tribe-events-calendar' ), $events_label_plural ); ?></a>
	</p>

	<!-- Notices -->
	<?php tribe_events_the_notices() ?>

	<?php the_title( '<h2 class="tribe-events-single-event-title summary entry-title">', '</h2>' ); ?>

	<div class="tribe-events-schedule updated published tribe-clearfix">
		<?php echo tribe_events_event_schedule_details( $event_id, '<h3>', '</h3>' ); ?>
		<?php if ( tribe_get_cost() ) : ?>
			<span class="tribe-events-divider">|</span>
			<span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
		<?php endif; ?>
	</div>

	<!-- Event header -->
	<div id="tribe-events-header" <?php tribe_events_the_header_attributes() ?>>
		<!-- Navigation -->
		<h3 class="tribe-events-visuallyhidden"><?php printf( __( '%s Navigation', 'tribe-events-calendar' ), $events_label_singular ); ?></h3>
		<ul class="tribe-events-sub-nav">
			<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>&laquo;</span> %title%' ) ?></li>
			<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>&raquo;</span>' ) ?></li>
		</ul>
		<!-- .tribe-events-sub-nav -->
	</div>
	<!-- #tribe-events-header -->
コード例 #10
0
			<li>
				<h4><a href="<?php 
    echo get_permalink($event);
    ?>
"><?php 
    echo get_the_title($event->ID);
    ?>
</a></h4>
				<?php 
    echo tribe_events_event_schedule_details($event->ID);
    ?>
				<?php 
    if (tribe_get_cost($event->ID) != '') {
        ?>
				<span class="tribe-events-divider">|</span>
					<span class="tribe-events-event-cost">
						<?php 
        echo tribe_get_cost($event->ID, true);
        ?>
					</span>
				<?php 
    }
    ?>
	
			</li>
		<?php 
}
?>
	</ul>
</div>
コード例 #11
0
ファイル: list-widget.php プロジェクト: donwea/nhap.org
    $output .= tribe_get_region();
} else {
    $output = rtrim($output, ', ');
}
if ($zip && tribe_get_zip() != '') {
    $output .= $space ? '<br />' : '';
    $output .= tribe_get_zip();
    $space = true;
}
if ($country && tribe_get_country() != '') {
    $output .= $space ? '<br />' : ' ';
    $output .= tribe_get_country();
}
if ($phone && tribe_get_phone() != '') {
    if ($output) {
        $output .= '<br/>';
    }
    $output .= tribe_get_phone();
}
if ($cost && tribe_get_cost() != '') {
    if ($output) {
        $output .= '<br/>';
    }
    $output .= __('Price:', 'tribe-events-calendar-pro') . ' ' . tribe_get_cost();
}
echo $output;
?>
	</div>
</li>
<?php 
$alt_text = empty($alt_text) ? 'alt' : '';
コード例 #12
0
<div class="container all-pad-gone">
    <div class="row">
        <div class="col-md-12 about"> 
            <?php 
the_title('<h1>', '</h1>');
?>
            <h2><?php 
echo tribe_events_event_schedule_details($event_id);
?>
</h2>  
            <?php 
if (tribe_get_cost()) {
    ?>
    			<span class="tribe-events-divider">|</span>
    			<span class="tribe-events-cost"><?php 
    echo "<b>Cost: </b>" . tribe_get_cost(null, true);
    ?>
</span>
    		<?php 
}
?>
      
        </div>
    </div>
    <br>
    <div class="row">
        <div class="col-md-12">
            <?php 
echo tribe_event_featured_image($event_id, 'full', false);
?>
            <?php 
コード例 #13
0
								<?php 
echo tribe_address_exists() ? '<address class="tribe-events-address"><i class="fa fa-map-marker"></i>' . tribe_get_full_address() . '</address>' : '';
?>
								<div class="updated published time-details">
									<i class="fa fa-calendar"></i><?php 
echo tribe_events_event_schedule_details();
?>
								</div>
							</div>
							<div class="right">
								<div class="event-cost">
									<i class="fa fa-ticket"></i>
									<?php 
if (tribe_get_cost(get_the_ID()) > 0) {
    echo tribe_get_cost(get_the_ID());
    echo '$';
} else {
    echo 'FREE';
}
?>
								</div>
							</div>	

						</div>	
					</div>
					
				</div><!-- .tribe-events-event-meta -->
			<?php 
do_action('tribe_events_after_the_meta');
?>
コード例 #14
0
/**
 * Prints correct title/subtitle for all cases
 */
function grve_header_title()
{
    global $post;
    $page_title = $page_description = $page_reversed = '';
    //Shop
    if (grve_woocommerce_enabled() && is_shop() && !is_search()) {
        $post_id = wc_get_page_id('shop');
        $page_title = get_the_title($post_id);
        $page_description = get_post_meta($post_id, 'grve_page_description', true);
        return array('title' => $page_title, 'description' => $page_description);
    }
    //Events Calendar Overview Pages
    if (grve_events_calendar_is_overview()) {
        return array('title' => tribe_get_events_title(true), 'description' => '');
    }
    //Main Pages
    if (is_front_page() && is_home()) {
        // Default homepage
        $page_title = get_bloginfo('name');
        $page_description = get_bloginfo('description');
    } else {
        if (is_front_page()) {
            // static homepage
            $page_title = get_bloginfo('name');
            $page_description = get_bloginfo('description');
        } else {
            if (is_home()) {
                // blog page
                $page_title = get_bloginfo('name');
                $page_description = get_bloginfo('description');
            } else {
                if (is_search()) {
                    $page_description = __('Search Results for :', GRVE_THEME_TRANSLATE);
                    $page_title = esc_attr(get_search_query());
                    $page_reversed = 'reversed';
                } else {
                    if (is_singular()) {
                        $post_id = $post->ID;
                        $post_type = get_post_type($post_id);
                        //Single Post
                        if ($post_type == 'page' && is_singular('page')) {
                            $page_title = get_the_title();
                            $page_description = get_post_meta($post_id, 'grve_page_description', true);
                        } else {
                            if ($post_type == 'portfolio' && is_singular('portfolio')) {
                                $page_title = get_the_title();
                                $page_description = get_post_meta($post_id, 'grve_portfolio_description', true);
                            } else {
                                if (grve_events_calendar_enabled() && $post_type == 'tribe_events' && is_singular('tribe_events')) {
                                    $page_title = get_the_title();
                                    $page_description = tribe_events_event_schedule_details($post_id, '', '');
                                    if (tribe_get_cost()) {
                                        $page_description .= '<span class="grve-event-cost grve-bg-primary-1">' . tribe_get_cost(null, true) . '</span>';
                                    }
                                } else {
                                    if (grve_events_calendar_enabled() && $post_type == 'tribe_organizer' && is_singular('tribe_organizer')) {
                                        $page_title = get_the_title();
                                        $page_description = grve_event_organizer_title_meta();
                                    } else {
                                        $page_title = get_the_title();
                                    }
                                }
                            }
                        }
                    } else {
                        if (is_archive()) {
                            //Post Categories
                            if (is_category()) {
                                $page_title = single_cat_title("", false);
                                $page_description = category_description();
                            } else {
                                if (is_tag()) {
                                    $page_description = __("Posts Tagged :", GRVE_THEME_TRANSLATE);
                                    $page_title = single_tag_title("", false);
                                    $page_reversed = 'reversed';
                                } else {
                                    if (is_author()) {
                                        global $author;
                                        $userdata = get_userdata($author);
                                        $page_description = __("Posts By :", GRVE_THEME_TRANSLATE);
                                        $page_title = $userdata->display_name;
                                        $page_reversed = 'reversed';
                                    } else {
                                        if (is_day()) {
                                            $page_description = __("Daily Archives :", GRVE_THEME_TRANSLATE);
                                            $page_title = get_the_time('l, F j, Y');
                                            $page_reversed = 'reversed';
                                        } else {
                                            if (is_month()) {
                                                $page_description = __("Monthly Archives :", GRVE_THEME_TRANSLATE);
                                                $page_title = get_the_time('F Y');
                                                $page_reversed = 'reversed';
                                            } else {
                                                if (is_year()) {
                                                    $page_description = __("Yearly Archives :", GRVE_THEME_TRANSLATE);
                                                    $page_title = get_the_time('Y');
                                                    $page_reversed = 'reversed';
                                                } else {
                                                    if (grve_woocommerce_enabled() && is_tax()) {
                                                        $page_title = single_term_title("", false);
                                                    } else {
                                                        $page_title = __("Archives", GRVE_THEME_TRANSLATE);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        } else {
                            $page_title = get_bloginfo('name');
                            $page_description = get_bloginfo('description');
                        }
                    }
                }
            }
        }
    }
    return array('title' => $page_title, 'description' => $page_description, 'reversed' => $page_reversed);
}
コード例 #15
0
 function dt_sc_events($atts, $content = null)
 {
     if (!function_exists('dt_events_list') && dttheme_is_plugin_active('the-events-calendar/the-events-calendar.php')) {
         extract(shortcode_atts(array('limit' => '-1', 'carousel' => ''), $atts));
         global $post;
         $out = '';
         $firstcnt = 2;
         $post_thumbnail = 'blogcourse-three-column';
         $tpl_default_settings = get_post_meta(get_the_ID(), '_tpl_default_settings', TRUE);
         $tpl_default_settings = is_array($tpl_default_settings) ? $tpl_default_settings : array();
         $page_layout = array_key_exists("layout", $tpl_default_settings) ? $tpl_default_settings['layout'] : "content-full-width";
         if ($page_layout == 'with-left-sidebar' || $page_layout == 'with-right-sidebar') {
             $post_thumbnail .= '-single-sidebar';
         } elseif ($page_layout == 'both-sidebar') {
             $post_thumbnail .= '-both-sidebar';
         }
         if ($carousel == 'true') {
             $html_tag = 'li';
         } else {
             $html_tag = 'div';
         }
         $all_events = tribe_get_events(array('eventDisplay' => 'all', 'posts_per_page' => $limit));
         $cnt = 0;
         foreach ($all_events as $post) {
             setup_postdata($post);
             $temp_class = $firstcls = '';
             if ($carousel != 'true') {
                 $no = $cnt + 1;
                 if ($no % $firstcnt == 1) {
                     $firstcls = ' first';
                 }
             }
             $out .= '<' . $html_tag . ' class="dt-sc-one-half column ' . $firstcls . '" id="post-' . get_the_ID() . '">';
             $out .= '<div class="dt-sc-event-container">';
             $out .= '<div class="dt-sc-event-thumb">';
             $out .= '<a href="' . get_permalink() . '" title="' . get_the_title() . '">';
             if (has_post_thumbnail()) {
                 $attr = array('title' => get_the_title());
                 $out .= get_the_post_thumbnail($post->ID, $post_thumbnail, $attr);
             } else {
                 $out .= '<img src="http://placehold.it/1170x895&text=Image" alt="' . get_the_title() . '" />';
             }
             $out .= '</a>';
             if (tribe_get_cost($post->ID) != '') {
                 $currency_symbol = tribe_get_event_meta($post->ID, '_EventCurrencySymbol', true);
                 if (!$currency_symbol) {
                     $currency_symbol = tribe_get_option('defaultCurrencySymbol', '$');
                 }
                 $currency_position = tribe_get_event_meta($post->ID, '_EventCurrencyPosition', true);
                 $out .= '<span class="event-price">';
                 if ($currency_position == 'suffix') {
                     $out .= tribe_get_cost($post->ID) . $currency_symbol;
                 } else {
                     $out .= $currency_symbol . tribe_get_cost($post->ID);
                 }
                 $out .= '</span>';
             }
             $out .= '</div>';
             $out .= '<div class="dt-sc-event-content">';
             $out .= '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>';
             $out .= '<div class="dt-sc-event-meta">';
             $out .= '<p> <i class="fa fa-calendar-o"> </i>' . tribe_get_start_date($post->ID, false, 'M Y @ h a') . ' - ' . tribe_get_end_date($post->ID, false, 'M Y @ h a') . ' </p>';
             $venue_id = tribe_get_venue_id($post->ID);
             if (isset($venue_id) && $venue_id > 0) {
                 $url = esc_url(get_permalink($venue_id));
                 $venue_name = tribe_get_venue($post->ID);
                 $out .= '<p> <i class="fa fa-map-marker"> </i>';
                 $out .= '<a href="' . $url . '">' . $venue_name . '</a>';
                 $out .= ', ' . tribe_get_country($post->ID);
                 if (tribe_get_map_link() != '') {
                     $out .= '<a href="' . tribe_get_map_link() . '" title="' . $venue_name . '" target="_blank">' . __(' + Google Map ', 'dt_themes') . '</a>';
                 }
                 $out .= '</p>';
             }
             $out .= '</div>';
             $out .= '</div>';
             $out .= '</div>';
             $out .= '</' . $html_tag . '>';
             $cnt++;
         }
         if ($carousel == 'true') {
             return '<div class="dt-sc-events-carousel-wrapper"><ul class="dt-sc-events-carousel">' . $out . '</ul><div class="carousel-arrows"><a class="events-prev" href=""></a><a class="events-next" href=""></a></div></div>';
         } else {
             return $out;
         }
     } else {
         return '';
     }
 }
コード例 #16
0
        ?>
"/><?php 
        echo tribe_get_end_date();
        ?>
</dd>	
			</div><!-- end .row -->
		<?php 
    }
    ?>
				
					<?php 
    if (tribe_get_cost()) {
        ?>
					<div class="row">
						<dt>Cost:</dt> <dd>$<?php 
        echo tribe_get_cost();
        ?>
</dd>
						</div><!-- end .row -->
				  <?php 
    }
    ?>
				
					<?php 
    $terms = wp_get_post_terms(get_the_ID(), 'tribe_events_cat');
    $count = count($terms);
    if ($count > 0) {
        ?>
						<div class="row">
						<dt>Category:</dt>
						
コード例 #17
0
function display_day($day, $monthView)
{
    global $post;
    $output = '';
    $posts_per_page = tribe_get_option('postsPerPage', 10);
    for ($i = 0; $i < count($monthView[$day]); $i++) {
        $post = $monthView[$day][$i];
        setup_postdata($post);
        $eventId = $post->ID . '-' . $day;
        $start = tribe_get_start_date($post->ID, false, 'U');
        $end = tribe_get_end_date($post->ID, false, 'U');
        $cost = tribe_get_cost($post->ID);
        ?>
		<div id='event_<?php 
        echo $eventId;
        ?>
' <?php 
        post_class('tribe-events-event tribe-events-real-event');
        ?>
>
			<a href="<?php 
        tribe_event_link();
        ?>
"><?php 
        the_title();
        ?>
</a>
			<div id='tooltip_<?php 
        echo $eventId;
        ?>
' class="tribe-events-tooltip" style="display:none;">
				<h5 class="tribe-events-event-title"><?php 
        the_title();
        ?>
</h5>
				<div class="tribe-events-event-body">
					<div class="tribe-events-event-date">
						<?php 
        if (!empty($start)) {
            echo date_i18n(get_option('date_format', 'F j, Y'), $start);
        }
        if (!tribe_get_event_meta($post->ID, '_EventAllDay', true)) {
            echo ' ' . date_i18n(get_option('time_format', 'g:i a'), $start);
        }
        ?>
						<?php 
        if (!empty($end) && $start !== $end) {
            if (date_i18n('Y-m-d', $start) == date_i18n('Y-m-d', $end)) {
                $time_format = get_option('time_format', 'g:i a');
                if (!tribe_get_event_meta($post->ID, '_EventAllDay', true)) {
                    echo " – " . date_i18n($time_format, $end);
                }
            } else {
                echo " – " . date_i18n(get_option('date_format', 'F j, Y'), $end);
                if (!tribe_get_event_meta($post->ID, '_EventAllDay', true)) {
                    echo ' ' . date_i18n(get_option('time_format', 'g:i a'), $end) . '<br />';
                }
            }
        }
        ?>
					</div>
					<?php 
        if (function_exists('has_post_thumbnail') && has_post_thumbnail()) {
            ?>
						<div class="tribe-events-event-thumb"><?php 
            the_post_thumbnail(array(75, 75));
            ?>
</div>
					<?php 
        }
        ?>
					<?php 
        echo has_excerpt() ? TribeEvents::truncate($post->post_excerpt) : TribeEvents::truncate(get_the_content(), 30);
        ?>

				</div>
				<span class="tribe-events-arrow"></span>
			</div>
		</div>
		<?php 
        if ($i < count($monthView[$day]) - 1) {
            echo "<hr />";
        }
    }
}
コード例 #18
0
</h6>
                                                        <span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php 
echo tribe_get_start_time($event_id, 'g:i A');
?>
 - <?php 
echo tribe_get_end_time($event_id, 'g:i A');
?>
</span>
                                                    </td>
                                                    <td class="class-details" valign="top" align="left" width="150" style="padding: 0 !important; width:150px; margin:0 !important; border-top:1px solid #ddd !important;">
                                                        <h6 style="color:#909090 !important; margin:0 0 10px 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; text-transform:uppercase; font-size:13px; font-weight:700 !important; margin-top:20px!important;"><?php 
esc_html_e('Student Cost', 'event-tickets');
?>
</h6>
                                                        <span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php 
echo tribe_get_cost($event_id, true);
?>
</span>
                                                    </td>
                                                    <td class="class-details" valign="top" align="left" width="150" style="padding: 0; width:150px; margin:0 !important; border-top:1px solid #ddd !important;">
                                                        <h6 style="color:#909090 !important; margin:0 0 10px 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; text-transform:uppercase; font-size:13px; font-weight:700 !important; margin-top:20px!important;"><?php 
esc_html_e('Course', 'event-tickets');
?>
</h6>
                                                        <span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php 
echo $course_list;
?>
</span>
                                                    </td>
                                                </tr>
                                            </table>
コード例 #19
0
echo tribe_get_event_link();
?>
" title="<?php 
the_title();
?>
" rel="bookmark">
		<?php 
the_title();
?>
		<!-- Event Cost -->
		<?php 
if (tribe_get_cost()) {
    ?>
 
			<?php 
    $cost = tribe_get_cost(null, true);
    if (!empty($cost)) {
        echo "<span class='tribe-events-event-cost'>&nbsp;&#8212;&nbsp;{$cost}</span>";
    }
    ?>
		<?php 
}
?>
	</a>
</h2>
<?php 
do_action('tribe_events_after_the_event_title');
?>

<!-- Event Image -->
<?php 
コード例 #20
0
ファイル: general.php プロジェクト: TMBR/johnjohn
 /**
  * Returns the event cost complete with currency symbol.
  *
  * Essentially an alias of tribe_get_cost(), as if called with the $withCurrencySymbol
  * argument set to true. Useful for callbacks.
  *
  * @category Cost
  * @param null $postId
  *
  * @return mixed|void
  */
 function tribe_get_formatted_cost($postId = null)
 {
     return apply_filters('tribe_get_formatted_cost', tribe_get_cost($postId, true));
 }
コード例 #21
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('categories' => "", 'items' => "3", 'paginate' => "no"), $atts, $this->config['shortcode']);
     $output = "";
     $posts = $this->query_entries($atts);
     $entries = $posts->posts;
     if (class_exists('Tribe__Events__Pro__Main')) {
         $ecp = Tribe__Events__Pro__Main::instance();
         $ecp->disable_recurring_info_tooltip();
     }
     if (!empty($entries)) {
         global $post;
         $default_id = $post->ID;
         $output .= "<div class='av-upcoming-events " . $meta['el_class'] . "'>";
         foreach ($entries as $entry) {
             $class = "av-upcoming-event-entry";
             $image = get_the_post_thumbnail($entry->ID, 'square', array('class' => 'av-upcoming-event-image'));
             $class .= !empty($image) ? " av-upcoming-event-with-image" : " av-upcoming-event-without-image";
             $title = get_the_title($entry->ID);
             $link = get_permalink($entry->ID);
             $post->ID = $entry->ID;
             //temp set of the post id so that tribe fetches the correct price symbol
             $price = tribe_get_cost($entry->ID, true);
             $venue = tribe_get_venue($entry->ID);
             $post->ID = $default_id;
             $output .= "<a href='{$link}' class='{$class}'>";
             if ($image) {
                 $output .= $image;
             }
             $output .= "<span class='av-upcoming-event-data'>";
             $output .= "<h4 title='av-upcoming-event-title'>{$title}</h4>";
             $output .= "<span class='av-upcoming-event-meta'>";
             $output .= "<span class='av-upcoming-event-schedule'>" . tribe_events_event_schedule_details($entry) . "</span>";
             if ($price) {
                 $output .= "<span class='av-upcoming-event-cost'>{$price}</span>";
             }
             if ($price && $venue) {
                 $output .= " - ";
             }
             if ($venue) {
                 $output .= "<span class='av-upcoming-event-venue'>{$venue}</span>";
             }
             $output .= apply_filters('avf_upcoming_event_extra_data', "", $entry);
             $output .= "</span>";
             $output .= "</span>";
             $output .= "</a>";
         }
         if ($atts['paginate'] == "yes" && ($avia_pagination = avia_pagination($posts->max_num_pages, 'nav'))) {
             $output .= "<div class='pagination-wrap pagination-" . Tribe__Events__Main::POSTTYPE . "'>{$avia_pagination}</div>";
         }
         $output .= "</div>";
     }
     if (class_exists('Tribe__Events__Pro__Main')) {
         // Re-enable recurring event info
         $ecp->enable_recurring_info_tooltip();
     }
     return $output;
 }
コード例 #22
0
ファイル: single-event.php プロジェクト: h3rodev/sometheme
?>

	<?php 
the_title('<h2 class="border-title"><span>', '</span></h2>');
?>

	<div class="tribe-events-schedule updated published tribe-clearfix">
		<?php 
echo tribe_events_event_schedule_details($event_id, '<h3>', '</h3>');
?>
		<?php 
if (tribe_get_cost()) {
    ?>
			<span class="tribe-events-divider">|</span>
			<span class="tribe-events-cost"><?php 
    echo tribe_get_cost(null, true);
    ?>
</span>
		<?php 
}
?>
	</div>

	<?php 
while (have_posts()) {
    the_post();
    ?>
		<div id="post-<?php 
    the_ID();
    ?>
" <?php 
コード例 #23
0
/**
 * Prints Simple Title for single events
 */
function grve_print_event_simple_title($event_id)
{
    $event_style = grve_option('event_style', 'default');
    if ('simple' == $event_style) {
        ?>
		<div class="grve-event-title-wrapper">
			<h1 class="grve-post-simple-title"><span><?php 
        the_title();
        ?>
</span></h1>
			<a class="grve-events-backlink" href="<?php 
        echo tribe_get_events_link();
        ?>
"><i class="grve-icon-th-large"></i><?php 
        _e('All Events', GRVE_THEME_TRANSLATE);
        ?>
</a>
		</div>
		<h5 id="grve-meta-event-simple-style">
			<?php 
        echo tribe_events_event_schedule_details($event_id, '', '');
        if (tribe_get_cost()) {
            ?>
			<span class="grve-events-divider">|</span>
			<span class="grve-event-cost grve-color-primary-1"><?php 
            echo tribe_get_cost(null, true);
            ?>
</span>
<?php 
        }
        ?>
		</h5>
<?php 
    }
}