当前位置: 首页>>代码示例>>PHP>>正文


PHP tribe_get_venue_id函数代码示例

本文整理汇总了PHP中tribe_get_venue_id函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_get_venue_id函数的具体用法?PHP tribe_get_venue_id怎么用?PHP tribe_get_venue_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了tribe_get_venue_id函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: generate_attendees_PDF

 public final function generate_attendees_PDF($tickets_list)
 {
     $this->load_pdf_libraries();
     $pdf = new FPDF();
     $ecp = TribeEvents::instance();
     $pdf->AddFont('OpenSans', '', 'opensans.php');
     $pdf->AddFont('SteelFish', '', 'steelfish.php');
     $pdf->SetTitle('EventTicket');
     $pdf->SetAuthor('The Events Calendar');
     $pdf->SetCreator('The Events Calendar');
     $defaults = array('event_id' => 0, 'ticket_name' => '', 'holder_name' => '', 'order_id' => '', 'ticket_id' => '', 'security_code' => '');
     foreach ($tickets_list as $ticket) {
         $ticket = wp_parse_args($ticket, $defaults);
         $event = get_post($ticket['event_id']);
         $venue_id = tribe_get_venue_id($event->ID);
         $venue = !empty($venue_id) ? get_post($venue_id)->post_title : '';
         $address = tribe_get_address($event->ID);
         $zip = tribe_get_zip($event->ID);
         $state = tribe_get_stateprovince($event->ID);
         $city = tribe_get_city($event->ID);
         $pdf->AddPage();
         $pdf->SetDrawColor(28, 166, 205);
         $pdf->SetFillColor(28, 166, 205);
         $pdf->Rect(15, 10, 180, 34, 'F');
         $pdf->SetTextColor(255);
         $pdf->SetFont('OpenSans', '', 10);
         $pdf->SetXY(30, 15);
         $pdf->Write(5, __('EVENT NAME:', 'tribe-events-calendar'));
         $pdf->SetXY(30, 28);
         $pdf->SetFont('SteelFish', '', 53);
         $title = strtoupper(utf8_decode($event->post_title));
         $size = 53;
         while ($pdf->GetStringWidth($title) > 151) {
             $size--;
             $pdf->SetFontSize($size);
         }
         $pdf->Write(5, $title);
         $pdf->SetTextColor(41);
         $pdf->SetFont('OpenSans', '', 10);
         $pdf->SetXY(30, 50);
         $pdf->Write(5, __('TICKET HOLDER:', 'tribe-events-calendar'));
         $pdf->SetXY(104, 50);
         $pdf->Write(5, __('LOCATION:', 'tribe-events-calendar'));
         $pdf->SetFont('SteelFish', '', 30);
         $pdf->SetXY(30, 59);
         $holder = strtoupper(utf8_decode($ticket['holder_name']));
         $size = 30;
         while ($pdf->GetStringWidth($holder) > 70) {
             $size--;
             $pdf->SetFontSize($size);
         }
         $pdf->Write(5, $holder);
         $pdf->SetXY(104, 59);
         $venue = strtoupper(utf8_decode($venue));
         $size = 30;
         while ($pdf->GetStringWidth($venue) > 70) {
             $size--;
             $pdf->SetFontSize($size);
         }
         $pdf->Write(5, $venue);
         $pdf->SetXY(104, 71);
         $address = strtoupper(utf8_decode($address));
         $size = 30;
         while ($pdf->GetStringWidth($address) > 70) {
             $size--;
             $pdf->SetFontSize($size);
         }
         $pdf->Write(5, $address);
         $pdf->SetXY(104, 83);
         $address2 = array($city, $state, $zip);
         $address2 = array_filter($address2);
         $address2 = join(', ', $address2);
         $address2 = strtoupper(utf8_decode($address2));
         $size = 30;
         while ($pdf->GetStringWidth($address2) > 70) {
             $size--;
             $pdf->SetFontSize($size);
         }
         $pdf->Write(5, $address2);
         $pdf->Line(15, 97, 195, 97);
         $pdf->SetFont('OpenSans', '', 10);
         $pdf->SetXY(30, 105);
         $pdf->Write(5, __('ORDER:', 'tribe-events-calendar'));
         $pdf->SetXY(80, 105);
         $pdf->Write(5, __('TICKET:', 'tribe-events-calendar'));
         $pdf->SetXY(120, 105);
         $pdf->Write(5, __('VERIFICATION:', 'tribe-events-calendar'));
         $pdf->SetFont('SteelFish', '', 53);
         $pdf->SetXY(30, 118);
         $pdf->Write(5, $ticket['order_id']);
         $pdf->SetXY(80, 118);
         $pdf->Write(5, $ticket['ticket_id']);
         $pdf->SetXY(120, 118);
         $pdf->Write(5, $ticket['security_code']);
         $pdf->Rect(15, 135, 180, 15, 'F');
         $pdf->SetTextColor(255);
         $pdf->SetFont('OpenSans', '', 10);
         $pdf->SetXY(30, 140);
         $pdf->Write(5, get_bloginfo('name'));
         $pdf->SetXY(104, 140);
//.........这里部分代码省略.........
开发者ID:mpaskew,项目名称:isc-dev,代码行数:101,代码来源:tribe-tickets.php

示例2: wpv_tribe_single_gmap

 function wpv_tribe_single_gmap()
 {
     $the_id = tribe_get_venue_id($GLOBALS['wpv_single_event_id']);
     $the_address = Tribe__Events__Main::instance()->fullAddressString($the_id);
     if (get_post_meta($GLOBALS['wpv_single_event_id'], '_EventShowMap', true) == '1') {
         echo WPV_Gmap::shortcode(array('address' => $the_address, 'height' => 500, 'html' => $the_address, 'popup' => true, 'scrollwheel' => false));
     }
 }
开发者ID:petrfaitl,项目名称:wordpress-event-theme,代码行数:8,代码来源:tribe-events-integration.php

示例3: 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

示例4: get_data

 /**
  * 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;
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:46,代码来源:Event.php

示例5: tribe_get_embedded_map

 /**
  * Google Map Embed
  *
  * Returns an embedded google maps for an event
  *
  * @param string $postId 
  * @param int $width 
  * @param int $height
  * @param bool $force_load If true, then load the map even if an address is not provided.
  * @return string An iframe pulling http://maps.google.com/ for this event
  * @since 2.0
  */
 function tribe_get_embedded_map($postId = null, $width = '', $height = '', $force_load = false)
 {
     $postId = TribeEvents::postIdHelper($postId);
     if (!tribe_is_venue($postId) && !tribe_is_event($postId)) {
         return false;
     }
     $postId = tribe_is_venue($postId) ? $postId : tribe_get_venue_id($postId);
     $locationMetaSuffixes = array('address', 'city', 'state', 'province', 'zip', 'country');
     $toUrlEncode = "";
     foreach ($locationMetaSuffixes as $val) {
         $metaVal = call_user_func('tribe_get_' . $val);
         if ($metaVal) {
             $toUrlEncode .= $metaVal . " ";
         }
     }
     if ($toUrlEncode) {
         $address = $toUrlEncode;
     } else {
         $address = null;
     }
     if (!$height) {
         $height = tribe_get_option('embedGoogleMapsHeight', '350');
     }
     if (!$width) {
         $width = tribe_get_option('embedGoogleMapsWidth', '100%');
     }
     if ($address || $force_load) {
         ob_start();
         include TribeEvents::instance()->pluginPath . 'admin-views/event-map.php';
         $google_map = ob_get_contents();
         ob_get_clean();
         return $google_map;
     } else {
         return '';
     }
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:48,代码来源:google-map.php

示例6: event_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;
 }
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:32,代码来源:Month.php

示例7: _e

			<h3 title="Click to toggle"><?php 
_e('Event Summary', 'tribe-events-calendar');
?>
</h3>



			<table class="eventtable ticket_list">
				<tr>
					<td width="33%" valign="top">
						<?php 
echo sprintf('<h4>%s</h4>', esc_html(__('Event Details', 'tribe-events-calendar')));
echo sprintf('<strong>%s </strong> %s', esc_html(__('Start Date / Time:', 'tribe-events-calendar')), tribe_get_start_date($event_id, false, get_option('date_format') . ' ' . get_option('time_format')));
echo "<br/>";
echo sprintf('<strong>%s </strong> %s', esc_html(__('End Date / Time:', 'tribe-events-calendar')), tribe_get_end_date($event_id, false, get_option('date_format') . ' ' . get_option('time_format')));
$venue_id = tribe_get_venue_id($event_id);
if (!empty($venue_id)) {
    $venue = get_post($venue_id);
}
if (!empty($venue)) {
    echo "<br/>";
    echo sprintf('<strong>%s </strong> %s', esc_html(__('Venue:', 'tribe-events-calendar')), esc_html($venue->post_title));
    $phone = get_post_meta($venue_id, '_VenuePhone', true);
    if (!empty($phone)) {
        echo "<br/>";
        echo sprintf('<strong>%s </strong> %s', esc_html(__('Phone:', 'tribe-events-calendar')), esc_html($phone));
    }
    $website = get_post_meta($venue_id, '_VenueURL', true);
    if (!empty($website)) {
        echo "<br/>";
        echo sprintf('<strong>%s </strong> <a target="_blank" href="%s">%s</a>', esc_html(__('Website:', 'tribe-events-calendar')), esc_url($website), esc_html($website));
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:attendees.php

示例8: tribe_get_venue_website_link

 /**
  * Get the link for the venue website.
  *
  * @param null $post_id
  * @param null $label
  *
  * @return string Formatted link to the venue website
  */
 function tribe_get_venue_website_link($post_id = null, $label = null)
 {
     $post_id = tribe_get_venue_id($post_id);
     $url = tribe_get_event_meta($post_id, '_VenueURL', true);
     if (!empty($url)) {
         $label = is_null($label) ? $url : $label;
         if (!empty($url)) {
             $parseUrl = parse_url($url);
             if (empty($parseUrl['scheme'])) {
                 $url = "http://{$url}";
             }
         }
         $html = sprintf('<a href="%s" target="%s">%s</a>', esc_url($url), apply_filters('tribe_get_venue_website_link_target', 'self'), apply_filters('tribe_get_venue_website_link_label', $label));
     } else {
         $html = '';
     }
     return apply_filters('tribe_get_venue_website_link', $html);
 }
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:26,代码来源:venue.php

示例9: get_ids

 protected function get_ids($post_id)
 {
     $post_id = $post_id = Tribe__Events__Main::postIdHelper($post_id);
     $this->event_id = tribe_is_event($post_id) ? $post_id : 0;
     $this->venue_id = tribe_is_venue($post_id) ? $post_id : tribe_get_venue_id($post_id);
 }
开发者ID:partisan-collective,项目名称:partisan,代码行数:6,代码来源:Embedded_Maps.php

示例10: sp_has_venue

 /**
  * @deprecated
  */
 function sp_has_venue($postId = null)
 {
     _deprecated_function(__FUNCTION__, '2.0', 'tribe_get_venue_id()');
     return tribe_get_venue_id($postId);
 }
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:8,代码来源:deprecated.php

示例11: generate_markers

 /**
  * Generates the array of markers to pin the events in the Google Map embed in the map view
  *
  * @param $events
  *
  * @return array
  */
 private function generate_markers($events)
 {
     $markers = array();
     foreach ($events as $event) {
         $venue_id = tribe_get_venue_id($event->ID);
         $lat = get_post_meta($venue_id, self::LAT, true);
         $lng = get_post_meta($venue_id, self::LNG, true);
         $address = tribe_get_address($event->ID);
         $title = $event->post_title;
         $link = get_permalink($event->ID);
         // replace commas with decimals in case they were saved with the european number format
         $lat = str_replace(',', '.', $lat);
         $lng = str_replace(',', '.', $lng);
         $markers[] = array('lat' => $lat, 'lng' => $lng, 'title' => $title, 'address' => $address, 'link' => $link, 'venue_id' => $venue_id, 'event_id' => $event->ID);
     }
     return $markers;
 }
开发者ID:pellio11,项目名称:ns-select-project,代码行数:24,代码来源:tribe-geoloc.class.php

示例12: tribe_get_venue_website_url

 /**
  * Returns the venue website URL related to the current post or for the optionally
  * specified post.
  *
  * @param int|null $post_id
  *
  * @return string
  */
 function tribe_get_venue_website_url($post_id = null)
 {
     return (string) tribe_get_event_meta(tribe_get_venue_id($post_id), '_VenueURL', true);
 }
开发者ID:partisan-collective,项目名称:partisan,代码行数:12,代码来源:venue.php

示例13: tribe_get_venues

*/
// the query
global $post;
$venues = tribe_get_venues();
?>
<h2>Venues</h2>
<?php 
foreach ($venues as $post) {
    setup_postdata($post);
    ?>

	<p><?php 
    the_title();
    ?>
:  <?php 
    echo tribe_get_venue_id();
    ?>
</p>

	<?php 
}
$organizers = tribe_get_organizers();
?>
<h2>Organizers</h2>
<?php 
foreach ($organizers as $post) {
    setup_postdata($post);
    ?>

	<p><?php 
    the_title();
开发者ID:lizbur10,项目名称:js_finalproject,代码行数:31,代码来源:list-organizers-venues.php

示例14: tribe_community_events_get_venue_description

/**
 * Return Venue Description
 *
 * @param int|null $venue_id (optional)
 * @return string
 * @author Peter Chester
 * @since 3.1
 */
function tribe_community_events_get_venue_description($venue_id = null)
{
    $venue_id = tribe_get_venue_id($venue_id);
    $description = $venue_id > 0 ? get_post($venue_id)->post_content : null;
    return apply_filters('tribe_get_venue_description', $description);
}
开发者ID:donwea,项目名称:nhap.org,代码行数:14,代码来源:tribe-community-events-template-tags.php

示例15: event_classes

 /**
  * css event wrapper classes used during loop
  *
  * @since  3.0
  * @author tim@imaginesimplicty.com
  * @return void
  */
 function event_classes()
 {
     if (self::$loop_type == 'allday') {
         $event = self::get_allday_event();
     } else {
         $event = self::get_hourly_event();
     }
     // Get our wrapper classes (for event categories, organizer, venue, and defaults)
     echo 'hentry vevent type-tribe_events post-' . $event->ID, ' tribe-clearfix ';
     // we need to adjust on behalf of weekly span scripts
     $day_span_length = $event->days_between + 1;
     if ($day_span_length > 0) {
         echo 'tribe-dayspan' . $day_span_length . ' ';
     }
     // if we have a venue add the class
     if ($venue_id = tribe_get_venue_id($event->ID)) {
         'tribe-events-venue-' . $venue_id . ' ';
     }
     // if we have an organizer add the class
     if ($organizer_id = tribe_get_organizer_id($event->ID)) {
         $classes[] = 'tribe-events-organizer-' . $organizer_id . ' ';
     }
     // add classes for all assigned categories
     $tribe_cat_slugs = tribe_get_event_cat_slugs($event->ID);
     foreach ($tribe_cat_slugs as $tribe_cat_slug) {
         echo 'tribe-events-category-' . $tribe_cat_slug . ' ';
     }
     if (self::$loop_type == 'hourly' && strtotime(self::$prior_event_date->EventStartDate) < strtotime($event->EventStartDate)) {
         echo 'tribe-event-overlap ';
     }
     self::$prior_event_date->EventStartDate = $event->EventStartDate;
 }
开发者ID:TyRichards,项目名称:river_of_life,代码行数:39,代码来源:week.php


注:本文中的tribe_get_venue_id函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。