本文整理汇总了PHP中tribe_get_venue函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_get_venue函数的具体用法?PHP tribe_get_venue怎么用?PHP tribe_get_venue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_get_venue函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: block_tribe_event_output
function block_tribe_event_output($params)
{
extract($params);
$default_excerpt_length = 650;
if (!isset($event_ID) || empty($event_ID)) {
return;
}
$event = get_post($event_ID);
// if block has event ID but the actual event does not exist then exit
if (!isset($event)) {
return;
}
// BLOCK CLASSES
$block_classes = "outter-wrapper";
if (!empty($custom_classes)) {
$block_classes .= " " . $custom_classes;
}
?>
<!-- BLOCK: LATEST POSTS-->
<!-- start outter-wrapper -->
<div <?php
pb_block_id_class($block_classes, $params);
?>
>
<!-- block styles -->
<style type="text/css" scoped>
<?php
include 'includes/inc_block_output_style.php';
?>
</style>
<!-- start main-container -->
<div class="main-container">
<!-- start main wrapper -->
<div class="main wrapper clearfix">
<!-- start main-content -->
<div class="main-content">
<!-- Start Post -->
<div class="clearfix tribe-events-tcblock">
<!-- Event Cost -->
<div class="tribe-events-event-cost">
<span><?php
echo tribe_get_formatted_cost($event_ID);
?>
</span>
</div>
<!-- Event Title -->
<h2 class="tribe-events-list-event-title summary">
<?php
printf('<a class="url" href="%s" title="%s" rel="bookmark">%s</a>', esc_url(tribe_get_event_link($event_ID)), esc_attr(get_the_title($event_ID)), esc_attr(get_the_title($event_ID)));
?>
</h2>
<!-- Event Image -->
<div class="tribe-events-event-image">
<?php
if (has_post_thumbnail($event_ID) && get_post(get_post_thumbnail_id($event_ID))) {
$post_thumbnail_src = wp_get_attachment_image_src(get_post_thumbnail_id($event_ID), 'full');
printf('<a href="%s" title="%s"><img src="%s" title="%s"/></a>', esc_url(tribe_get_event_link($event_ID)), esc_attr(get_the_title($event_ID)), esc_url($post_thumbnail_src[0]), esc_attr(get_the_title($event_ID)));
}
?>
</div>
<!-- Event Meta -->
<div class="tribe-events-event-meta vcard location">
<!-- Schedule & Recurrence Details -->
<div class="updated published time-details">
<?php
printf('<span class="date-start dtstart">%s</span>', esc_attr(tribe_get_start_date($event_ID)));
?>
</div>
<!-- Venue Display Info -->
<div class="tribe-events-venue-details">
<span class="author fn org"><?php
echo tribe_get_venue($event_ID);
?>
</span>,
<address class="tribe-events-address">
<span class="adr">
<span class="street-address"><?php
echo tribe_get_address($event_ID);
?>
</span>
<span class="delimiter">,</span>
<span class="locality"><?php
echo tribe_get_city($event_ID);
?>
</span>
//.........这里部分代码省略.........
开发者ID:jameymcelveen,项目名称:com.flyingtigersrc.www,代码行数:101,代码来源:block_tribe_event_output.php
示例2: build_data
/**
* Compile the schema.org event data into an array
*/
private function build_data()
{
global $post;
$id = $post->ID;
$events_data = array();
// Index by ID: this will allow filter code to identify the actual event being referred to
// without injecting an additional property
$events_data[$id] = new stdClass();
$events_data[$id]->{'@context'} = 'http://schema.org';
$events_data[$id]->{'@type'} = 'Event';
$events_data[$id]->name = get_the_title();
if (has_post_thumbnail()) {
$events_data[$id]->image = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
}
$events_data[$id]->url = get_the_permalink($post->ID);
$events_data[$id]->startDate = get_gmt_from_date(tribe_get_start_date($post, true, TribeDateUtils::DBDATETIMEFORMAT), 'c');
$events_data[$id]->endDate = get_gmt_from_date(tribe_get_end_date($post, true, TribeDateUtils::DBDATETIMEFORMAT), 'c');
if (tribe_has_venue($id)) {
$events_data[$id]->location = new stdClass();
$events_data[$id]->location->{'@type'} = 'Place';
$events_data[$id]->location->name = tribe_get_venue($post->ID);
$events_data[$id]->location->address = strip_tags(str_replace("\n", '', tribe_get_full_address($post->ID)));
}
/**
* Allows the event data to be modifed by themes and other plugins.
*
* @param array $events_data objects representing the Google Markup for each event.
*/
$events_data = apply_filters('tribe_google_event_data', $events_data);
// Strip the post ID indexing before returning
$events_data = array_values($events_data);
return $events_data;
}
开发者ID:chicosilva,项目名称:olharambiental,代码行数:36,代码来源:Google_Data_Markup.php
示例3: venue_name
/**
* Render the name of the venue (with the link).
*
* @deprecated since 3.6
* @param string $html The current venue name.
* @param string $meta_id The meta group this is in.
* @return string The modified/linked venue name.
* @author Timothy Wood
* @since 3.0
*/
public static function venue_name($html, $meta_id)
{
global $_tribe_meta_factory;
$post_id = get_the_ID();
$name = tribe_get_venue($post_id);
$link = !empty($name) ? '<a href="' . tribe_get_venue_link($post_id, false) . '">' . $name . '</a>' : '';
$html = empty($link) ? $html : Tribe_Meta_Factory::template($_tribe_meta_factory->meta[$meta_id]['label'], $link, $meta_id);
return apply_filters('tribe_event_pro_meta_venue_name', $html, $meta_id);
}
开发者ID:pellio11,项目名称:ns-select-project,代码行数:19,代码来源:SingleEventMeta.php
示例4: bs_event_table_content
function bs_event_table_content($column_name, $post_id)
{
if ($column_name == 'date_pub') {
$event_date = get_post_meta($post_id, '_bs_meta_event_date', true);
//echo date( _x( 'F d, Y', 'Event date format', 'textdomain' ), strtotime( $event_date ) );
echo get_the_date();
}
if ($column_name == 'venue') {
echo $venue = tribe_get_venue($post_id);
}
}
开发者ID:CityOfPrescott,项目名称:tabula-rasa_city-of-prescott,代码行数:11,代码来源:functions-tribe_events.php
示例5: build_data
/**
* Compile the schema.org event data into an array
*/
protected function build_data()
{
global $post;
$id = $post->ID;
$event_data = parent::build_data();
$event_data[$id]->{'@type'} = 'Event';
$event_data[$id]->startDate = get_gmt_from_date(tribe_get_start_date($post, true, Tribe__Events__Date_Utils::DBDATETIMEFORMAT), 'c');
$event_data[$id]->endDate = get_gmt_from_date(tribe_get_end_date($post, true, Tribe__Events__Date_Utils::DBDATETIMEFORMAT), 'c');
if (tribe_has_venue($id)) {
$event_data[$id]->location = new stdClass();
$event_data[$id]->location->{'@type'} = 'Place';
$event_data[$id]->location->name = tribe_get_venue($post->ID);
$event_data[$id]->location->address = strip_tags(str_replace("\n", '', tribe_get_full_address($post->ID)));
}
return $event_data;
}
开发者ID:bostondv,项目名称:the-events-calendar,代码行数:19,代码来源:Event.php
示例6: tribe_get_venue_link
/**
* Venue Link
*
* Returns or display the event Organizer Name with a link to their supplied website url
*
* @param int $postId Can supply either event id or venue id, if none specified, current post is used
* @param bool $display If true displays full html links around venue's name, if false returns just the link without displaying it
* @return string Venue if $display is set to false, void if it's set to true.
* @since 2.0
*/
function tribe_get_venue_link($postId = null, $display = true)
{
$url = esc_url(get_permalink(tribe_get_venue_id($postId)));
if ($display && $url != '') {
$venue_name = tribe_get_venue($postId);
$link = '<a href="' . $url . '">' . $venue_name . '</a>';
} else {
$link = $url;
}
$link = apply_filters('tribe_get_venue_link', $link, $postId, $display, $url);
if ($display) {
echo $link;
} else {
return $link;
}
}
开发者ID:mpaskew,项目名称:isc-dev,代码行数:26,代码来源:venue.php
示例7: shortcode_handler
/**
* 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;
}
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:53,代码来源:events_upcoming.php
示例8: get_api_meta_data
/**
* Retrieve the data to use when returning an event through the REST API.
*
* @param $object
* @param $field
* @param $request
*
* @return string
*/
public function get_api_meta_data($object, $field, $request)
{
if ('event_city' === $field) {
return esc_html(tribe_get_city($object['id']));
}
if ('event_state' === $field) {
return esc_html(tribe_get_state($object['id']));
}
if ('event_venue' === $field) {
return esc_html(tribe_get_venue($object['id']));
}
if ('start_date' === $field) {
return esc_html(get_post_meta($object['id'], '_EventStartDate', true));
}
if ('end_date' === $field) {
return esc_html(get_post_meta($object['id'], '_EventEndDate', true));
}
return '';
}
开发者ID:rclilly,项目名称:WSUWP-Extended-Events-Calendar,代码行数:28,代码来源:wsuwp-extended-events-calendar.php
示例9: event_details_top
/**
* Injects event meta data into the Attendees report
*
* @param int $event_id
*/
public function event_details_top($event_id)
{
$post_type = get_post_type($event_id);
if (Tribe__Events__Main::POSTTYPE === $post_type) {
echo '
<li>
<strong>' . esc_html__('Start Date:', 'the-events-calendar') . '</strong>
' . tribe_get_start_date($event_id, false, tribe_get_date_format(true)) . '
</li>
';
}
if (tribe_has_venue($event_id)) {
$venue_id = tribe_get_venue_id($event_id);
echo '
<li class="venue-name">
<strong>' . tribe_get_venue_label_singular() . ': </strong>
<a href="' . get_edit_post_link($venue_id) . '" title="' . esc_html__('Edit Venue', 'the-events-calendar') . '">' . tribe_get_venue($event_id) . '</a>
</li>
';
}
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:26,代码来源:Attendees_Report.php
示例10: get_map
/**
* Returns the placeholder HTML needed to embed a map within a page and
* additionally enqueues supporting scripts, etc.
*
* @param int $post_id ID of the pertinent event or venue
* @param int $width
* @param int $height
* @param bool $force_load add the map even if no address data can be found
*
* @return string
*/
public function get_map($post_id, $width, $height, $force_load)
{
$this->get_ids($post_id);
// Bail if either the venue or event couldn't be determined
if (!tribe_is_venue($this->venue_id) && !tribe_is_event($this->event_id)) {
return apply_filters('tribe_get_embedded_map', '');
}
$this->form_address();
if (empty($this->address) && !$force_load) {
return apply_filters('tribe_get_embedded_map', '');
}
$this->embedded_maps[] = array('address' => $this->address, 'title' => tribe_get_venue($this->venue_id));
end($this->embedded_maps);
$index = key($this->embedded_maps);
// Generate the HTML used to "house" the map
ob_start();
tribe_get_template_part('modules/map', null, array('index' => $index, 'width' => null === $width ? apply_filters('tribe_events_single_map_default_width', '100%') : $width, 'height' => null === $height ? apply_filters('tribe_events_single_map_default_height', '350px') : $height));
$this->setup_scripts();
do_action('tribe_events_map_embedded', $index, $this->venue_id);
return apply_filters('tribe_get_embedded_map', ob_get_clean());
}
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:32,代码来源:Embedded_Maps.php
示例11: ecs_fetch_events
//.........这里部分代码省略.........
}
// Past Event
$meta_date_compare = '>=';
$meta_date_date = date('Y-m-d');
if ($atts['time'] == 'past' || !empty($atts['past'])) {
$meta_date_compare = '<';
}
// Key
if (str_replace(' ', '', trim(strtolower($atts['key']))) == 'startdate') {
$atts['key'] = '_EventStartDate';
} else {
$atts['key'] = '_EventEndDate';
}
// Date
$atts['meta_date'] = array(array('key' => $atts['key'], 'value' => $meta_date_date, 'compare' => $meta_date_compare, 'type' => 'DATETIME'));
// Specific Month
if ($atts['month'] == 'current') {
$atts['month'] = date('Y-m');
}
if ($atts['month']) {
$month_array = explode("-", $atts['month']);
$month_yearstr = $month_array[0];
$month_monthstr = $month_array[1];
$month_startdate = date($month_yearstr . "-" . $month_monthstr . "-1");
$month_enddate = date($month_yearstr . "-" . $month_monthstr . "-t");
$atts['meta_date'] = array(array('key' => $atts['key'], 'value' => array($month_startdate, $month_enddate), 'compare' => 'BETWEEN', 'type' => 'DATETIME'));
}
$posts = get_posts(array('post_type' => 'tribe_events', 'posts_per_page' => $atts['limit'], 'tax_query' => $atts['event_tax'], 'meta_key' => $atts['key'], 'orderby' => 'meta_value', 'author' => $atts['author'], 'order' => $atts['order'], 'meta_query' => array($atts['meta_date'])));
if ($posts) {
$output .= '<ul class="ecs-event-list">';
$atts['contentorder'] = explode(',', $atts['contentorder']);
foreach ($posts as $post) {
setup_postdata($post);
$li_classes = 'ecs-event';
$start_date = tribe_get_start_date($post, false, 'Y-m-d');
$today = date('Y-m-d', current_time('timestamp'));
$tomorrow = date('Y-m-d', strtotime('tomorrow', current_time('timestamp')));
if ($start_date == $today) {
$li_classes .= ' ecs-today';
} else {
if ($start_date == $tomorrow) {
$li_classes .= ' ecs-tomorrow';
}
}
$output .= '<li class="' . $li_classes . '">';
// Put Values into $output
foreach ($atts['contentorder'] as $contentorder) {
switch (trim($contentorder)) {
case 'title':
$output .= '<h4 class="entry-title summary">' . '<a href="' . tribe_get_event_link() . '" rel="bookmark">' . apply_filters('ecs_event_list_title', get_the_title(), $atts) . '</a>
</h4>';
break;
case 'thumbnail':
if (self::isValid($atts['thumb'])) {
$thumbWidth = is_numeric($atts['thumbwidth']) ? $atts['thumbwidth'] : '';
$thumbHeight = is_numeric($atts['thumbheight']) ? $atts['thumbheight'] : '';
if (!empty($thumbWidth) && !empty($thumbHeight)) {
$output .= get_the_post_thumbnail($post->ID, array($thumbWidth, $thumbHeight));
} else {
$size = !empty($thumbWidth) && !empty($thumbHeight) ? array($thumbWidth, $thumbHeight) : 'medium';
if ($thumb = get_the_post_thumbnail($post->ID, $size)) {
$output .= '<a href="' . tribe_get_event_link() . '">';
$output .= $thumb;
$output .= '</a>';
}
}
}
break;
case 'excerpt':
if (self::isValid($atts['excerpt'])) {
$excerptLength = is_numeric($atts['excerpt']) ? $atts['excerpt'] : 100;
$output .= '<p class="ecs-excerpt">' . self::get_excerpt($excerptLength) . '</p>';
}
break;
case 'date':
if (self::isValid($atts['eventdetails'])) {
$output .= '<span class="duration time">' . apply_filters('ecs_event_list_details', tribe_events_event_schedule_details(), $atts) . '</span>';
}
break;
case 'venue':
if (self::isValid($atts['venue'])) {
$output .= '<span class="duration venue">' . apply_filters('ecs_event_list_venue', ' <em>at</em> ' . tribe_get_venue(), $atts) . '</span>';
}
break;
}
}
$output .= '</li>';
}
$output .= '</ul>';
if (self::isValid($atts['viewall'])) {
$output .= '<span class="ecs-all-events"><a href="' . apply_filters('ecs_event_list_viewall_link', tribe_get_events_link(), $atts) . '" rel="bookmark">' . translate(apply_filters('ecs_event_list_viewall_text', 'View All Events', $atts), 'tribe-events-calendar') . '</a></span>';
}
} else {
//No Events were Found
$output .= translate($atts['message'], 'tribe-events-calendar');
}
// endif
wp_reset_query();
return $output;
}
开发者ID:rclilly,项目名称:The-Events-Calendar-Shortcode,代码行数:101,代码来源:the-events-calendar-shortcode.php
示例12: die
* creating a venue for user submitted events.
*
* This is ALSO used in the Venue edit view. Be careful to test changes in both places.
*
* Override this template in your own theme by creating a file at
* [your-theme]/tribe-events/community/modules/venue.php
*
* @package TribeCommunityEvents
* @since 2.1
* @author Modern Tribe Inc.
*
*/
if (!defined('ABSPATH')) {
die('-1');
}
$venue_name = tribe_get_venue();
$venue_phone = tribe_get_phone();
$venue_address = tribe_get_address();
$venue_city = tribe_get_city();
$venue_province = tribe_get_province();
$venue_state = tribe_get_state();
$venue_country = tribe_get_country();
$venue_zip = tribe_get_zip();
if (!tribe_get_venue_id() && tribe_get_option('defaultValueReplace')) {
$venue_phone = empty($venue_phone) ? tribe_get_option('eventsDefaultPhone') : $venue_phone;
$venue_address = empty($venue_address) ? tribe_get_option('eventsDefaultAddress') : $venue_address;
$venue_city = empty($venue_city) ? tribe_get_option('eventsDefaultCity') : $venue_city;
$venue_state = empty($venue_state) ? tribe_get_option('eventsDefaultState') : $venue_state;
$venue_province = empty($venue_province) ? tribe_get_option('eventsDefaultProvince') : $venue_province;
$venue_country = empty($venue_country) ? tribe_get_option('defaultCountry') : $venue_country;
$venue_zip = empty($venue_zip) ? tribe_get_option('eventsDefaultZip') : $venue_zip;
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:venue.php
示例13: esc_attr
?>
" value="<?php
echo esc_attr($instance['venue_ID']);
?>
">
<?php
foreach ($venues as $venue) {
?>
<option value="<?php
echo esc_attr($venue->ID);
?>
" <?php
selected($venue->ID == $instance['venue_ID']);
?>
> <?php
echo tribe_get_venue($venue->ID);
?>
</option>
<?php
}
?>
</select>
</p>
<p>
<label for="<?php
echo esc_attr($this->get_field_id('count'));
?>
"><?php
esc_html_e('Number of events to show:', 'tribe-events-calendar-pro');
?>
</label>
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:31,代码来源:widget-admin-venue.php
示例14: tribe_get_organizer
<dd class="vcard author"><span class="fn url"><?php
echo tribe_get_organizer();
?>
</span></dd>
</div><!-- end .row -->
<?php
}
?>
<?php
if (tribe_get_venue()) {
?>
<div class="row">
<dt>Location:</dt>
<dd><?php
echo tribe_get_venue(get_the_ID(), true);
?>
</dd>
</div>
<?php
}
?>
<?php
if (tribe_get_organizer_phone()) {
?>
<div class="row">
<dt>Phone:</dt>
<dd><?php
echo tribe_get_organizer_phone();
?>
开发者ID:TyRichards,项目名称:river_of_life,代码行数:31,代码来源:single-event.php
示例15: dt_sc_events
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 '';
}
}
开发者ID:enlacee,项目名称:anb.platicom.com.pe,代码行数:89,代码来源:shortcodes.php
示例16: _e
</div>
<?php
} else {
?>
<div><?php
_e('All Day', 'church-event');
?>
</div>
<?php
}
?>
<div>@ <?php
if (class_exists('Tribe__Events__Pro__Templates__Single_Venue')) {
tribe_get_venue_link($event->ID, true);
} else {
echo tribe_get_venue($event->ID);
}
?>
</div>
</div>
<?php
if (!empty($read_more_text)) {
?>
<a href="<?php
tribe_event_link($event);
?>
" title="<?php
esc_attr($read_more_text);
?>
" class="button button-border accent1 hover-accent1"><span class="btext"><?php
echo $read_more_text;
开发者ID:petrfaitl,项目名称:wordpress-event-theme,代码行数:31,代码来源:multiple.php
示例17: esc_url
<a href="<?php
echo esc_url(tribe_get_events_link());
?>
" rel="bookmark"><?php
printf(__('← Back to %s', 'tribe-events-calendar-pro'), tribe_get_event_label_plural());
?>
</a>
</p>
<div class="tribe-events-venue-meta tribe-clearfix">
<!-- Venue Title -->
<?php
do_action('tribe_events_single_venue_before_title');
?>
<h2 class="tribe-venue-name"><?php
echo tribe_get_venue($venue_id);
?>
</h2>
<?php
do_action('tribe_events_single_venue_after_title');
?>
<?php
if (tribe_embed_google_map() && tribe_address_exists()) {
?>
<!-- Venue Map -->
<div class="tribe-events-map-wrap">
<?php
echo tribe_get_embedded_map($venue_id, '100%', '200px');
?>
</div><!-- .tribe-events-map-wrap -->
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:31,代码来源:single-venue.php
示例18: swsctp_class_column_mod
function swsctp_class_column_mod()
{
if (class_exists('Jigsaw')) {
Jigsaw::add_column('tribe_events', 'Instructor(s)', function ($post_id) {
$tribe_events_inst1 = get_post_meta($post_id, '_tribe_events_inst1', TRUE);
$tribe_events_inst2 = get_post_meta($post_id, '_tribe_events_inst2', TRUE);
$tribe_events_inst3 = get_post_meta($post_id, '_tribe_events_inst3', TRUE);
$tribe_events_inst1_stat = get_post_meta($post_id, '_tribe_events_inst1_stat', TRUE);
$tribe_events_inst2_stat = get_post_meta($post_id, '_tribe_events_inst2_stat', TRUE);
$tribe_events_inst3_stat = get_post_meta($post_id, '_tribe_events_inst3_stat', TRUE);
$user_data1 = get_userdata($tribe_events_inst1);
$user_data2 = get_userdata($tribe_events_inst2);
$user_data3 = get_userdata($tribe_events_inst3);
if ($user_data1->last_name !== null) {
echo "<span class='tribe_inst {$tribe_events_inst1_stat}'>" . $user_data1->last_name . ", " . $user_data1->first_name . "</span>";
if ($user_data2->last_name !== null) {
echo "<br><span class='tribe_inst {$tribe_events_inst2_stat}'>" . $user_data2->last_name . ", " . $user_data2->first_name . "</span>";
if ($user_data3->last_name !== null) {
echo "<br><span class='tribe_inst {$tribe_events_inst3_stat}'>" . $user_data3->last_name . ", " . $user_data3->first_name . "</span>";
}
}
} else {
echo "None Assigned";
}
}, 2);
Jigsaw::add_column('tribe_events', 'Status', function ($post_id) {
$tribe_events_status = get_post_meta($post_id, '_tribe_events_status', TRUE);
if ($tribe_events_status == "scheduled") {
$status = "Scheduled";
} else {
if ($tribe_events_status == "cancelled") {
$status = "Cancelled";
} else {
if ($tribe_events_status == "completed") {
$status = "Completed";
}
}
}
echo $status;
}, 3);
Jigsaw::add_column('tribe_events', 'Class Date', function ($post_id) {
$class_date = tribe_get_start_date($post_id);
echo $class_date;
}, 4);
Jigsaw::add_column('tribe_events', 'Location', function ($post_id) {
$venue = tribe_get_venue($post_id);
$location = tribe_get_full_address($post_id, true);
echo $venue . "<br>" . $location;
}, 5);
Jigsaw::add_column('tribe_events', 'Date Added', function ($post_id) {
$pfx_date = get_the_date('m/d/Y', $post_id);
echo $pfx_date;
}, 10);
Jigsaw::remove_column('tribe_events', 'comments');
Jigsaw::remove_column('tribe_events', 'author');
Jigsaw::remove_column('tribe_events', 'feature');
Jigsaw::remove_column('tribe_events', 'image');
Jigsaw::remove_column('tribe_events', 'thumb');
Jigsaw::remove_column('tribe_events', 'thumbnail');
Jigsaw::remove_column('tribe_events', 'date');
Jigsaw::remove_column('tribe_events', 'start-date');
Jigsaw::remove_column('tribe_events', 'end-date');
Jigsaw::remove_column('tribe_events', 'tags');
}
}
开发者ID:csteines,项目名称:Complete-Training-Plugin,代码行数:65,代码来源:column-mods.php
示例19: tribe_get_option
var myOptions = {
zoom: <?php
echo tribe_get_option('embedGoogleMapsZoom', '10');
?>
,
center: event_address,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("tribe-events-gmap"), myOptions);
var marker = new google.maps.Marker(
{
map: map,
title: <?php
echo json_encode(tribe_get_venue($postId));
?>
,
position: event_address
}
);
}
function codeAddress(address) {
var geocoder= new google.maps.Geocoder();
var address = address || <?php
echo json_encode($address);
?>
;
geocoder.geocode(
{ 'address': address },
开发者ID:TyRichards,项目名称:river_of_life,代码行数:31,代码来源:event-map.php
示例20: tribe_get_cost
echo $post->post_title;
?>
</a></h2>
<?php
if (tribe_get_cost()) {
?>
<span class="tribe-mini-calendar-event-cost"><?php
echo tribe_get_cost(null, true);
?>
</span>
<div class="tribe-events-divider ">|</div>
<?php
}
?>
<?php
echo tribe_events_event_schedule_details();
?>
<?php
if (tribe_get_venue()) {
?>
<div class="tribe-mini-calendar-event-venue">
<?php
echo tribe_get_venue_link($post->ID);
?>
</div>
<?php
}
?>
</div>
</div>
开发者ID:donwea,项目名称:nhap.org,代码行数:30,代码来源:single-event.php
注:本文中的tribe_get_venue函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论