• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tribe_get_address函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了tribe_get_address函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: 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


示例3: get_data

 /**
  * Fetches the JSON-LD data for this type of object
  *
  * @param  int|WP_Post|null $post The post/venue
  * @param  array  $args
  * @return array
  */
 public function get_data($post = null, $args = array('context' => false))
 {
     $data = parent::get_data($post, $args);
     // If we have an Empty data we just skip
     if (empty($data)) {
         return array();
     }
     // Fetch first key
     $post_id = key($data);
     // Fetch first Value
     $data = reset($data);
     $data->address = array();
     $data->address['streetAddress'] = tribe_get_address($post_id);
     $data->address['addressLocality'] = tribe_get_city($post_id);
     $data->address['addressRegion'] = tribe_get_region($post_id);
     $data->address['postalCode'] = tribe_get_zip($post_id);
     $data->address['addressCountry'] = tribe_get_country($post_id);
     // Filter empty entries and convert to object
     $data->address = (object) array_filter($data->address);
     $geo = tribe_get_coordinates($post_id);
     if (!empty($geo['lat']) && !empty($geo['lng'])) {
         $data->geo = (object) array('@type' => 'GeoCoordinates', 'latitude' => $geo['lat'], 'longitude' => $geo['lng']);
     }
     $data->telephone = tribe_get_phone($post_id);
     $data->sameAs = tribe_get_venue_website_url($post_id);
     return array($post_id => $data);
 }
开发者ID:nullify005,项目名称:shcc-website,代码行数:34,代码来源:Venue.php


示例4: sp_get_address

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


示例5: tribe_address_exists

 /**
  * Address Test
  *
  * Returns true if any of the following exist: address, city, state/province (region), country or zip
  *
  * @param int $postId Can supply either event id or venue id, if none specified, current post is used
  *
  * @return bool True if any part of an address exists
  */
 function tribe_address_exists($postId = null)
 {
     if (tribe_get_address($postId) || tribe_get_city($postId) || tribe_get_region($postId) || tribe_get_country($postId) || tribe_get_zip($postId)) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:derwegas,项目名称:strubbelkinder,代码行数:17,代码来源:venue.php


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


示例7: 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);
         $markers[] = array('lat' => $lat, 'lng' => $lng, 'title' => $title, 'address' => $address, 'link' => $link);
     }
     return $markers;
 }
开发者ID:Vinnica,项目名称:theboxerboston.com,代码行数:21,代码来源:tribe-geoloc.class.php


示例8: tribe_get_venue

?>
	<?php 
if (isset($includeVenueName) && $includeVenueName && tribe_get_venue($postId)) {
    ?>
		<?php 
    $address_out[] = '<span itemprop="addressLocality">' . tribe_get_venue($postId) . '</span>';
    ?>
	<?php 
}
?>
	
	<?php 
if (tribe_get_address($postId)) {
    ?>
		<?php 
    $address_out[] = '<span itemprop="streetAddress">' . tribe_get_address($postId) . '</span>';
    ?>
	<?php 
}
?>

	<?php 
$cityregion = '';
if (tribe_get_city($postId)) {
    $cityregion .= tribe_get_city($postId);
}
if (tribe_get_region($postId)) {
    if ($cityregion != '') {
        $cityregion .= ', ';
    }
    $cityregion .= tribe_get_region($postId);
开发者ID:EfncoPlugins,项目名称:the-events-calendar,代码行数:31,代码来源:full-address.php


示例9: fullAddressString

 /**
  *  Returns a string version of the full address of an event
  *
  * @param int|WP_Post The post object or post id.
  *
  * @return string The event's address.
  */
 public function fullAddressString($postId = null)
 {
     $address = '';
     if (tribe_get_address($postId)) {
         $address .= tribe_get_address($postId);
     }
     if (tribe_get_city($postId)) {
         if ($address != '') {
             $address .= ', ';
         }
         $address .= tribe_get_city($postId);
     }
     if (tribe_get_region($postId)) {
         if ($address != '') {
             $address .= ', ';
         }
         $address .= tribe_get_region($postId);
     }
     if (tribe_get_zip($postId)) {
         if ($address != '') {
             $address .= ', ';
         }
         $address .= tribe_get_zip($postId);
     }
     if (tribe_get_country($postId)) {
         if ($address != '') {
             $address .= ', ';
         }
         $address .= tribe_get_country($postId);
     }
     return $address;
 }
开发者ID:kevinaxu,项目名称:99boulders,代码行数:39,代码来源:Main.php


示例10: tribe_get_venue_link

		<?php 
if ($venue && tribe_get_venue() != '') {
    ?>
			<span class="fn org tribe-venue"><?php 
    echo tribe_get_venue_link();
    ?>
</span> 
		<?php 
}
?>

		<?php 
if ($address && tribe_get_address() != '') {
    ?>
			<span class="street-address"><?php 
    echo tribe_get_address();
    ?>
</span>
		<?php 
}
?>

		<?php 
if ($city && tribe_get_city() != '') {
    ?>
			<span class="locality"><?php 
    echo tribe_get_city();
    ?>
</span>
		<?php 
}
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:31,代码来源:list-widget.php


示例11: tribe_get_event_link

echo tribe_get_event_link($post);
?>
"><?php 
echo $post->post_title;
?>
</a>
	</div>
	<div class="loc"><?php 
if ($venue && tribe_get_venue() != '') {
    $output .= $space ? '<br />' : '';
    $output .= tribe_get_venue();
    $space = true;
}
if ($address && tribe_get_address()) {
    $output .= $space ? '<br />' : '';
    $output .= tribe_get_address();
    $space = true;
}
if ($city && tribe_get_city() != '') {
    $output .= $space ? '<br />' : '';
    $output .= tribe_get_city() . ', ';
    $space = true;
}
if ($region && tribe_get_region()) {
    $output .= !$city ? '<br />' : '';
    $space = true;
    $output .= tribe_get_region();
} else {
    $output = rtrim($output, ', ');
}
if ($zip && tribe_get_zip() != '') {
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:list-widget.php


示例12: process_the_events_calendar_tags

 /**
  * Process event calendar tags
  */
 private function process_the_events_calendar_tags($content)
 {
     if (!function_exists('tribe_get_start_date')) {
         return $content;
     }
     // The Events Calendar
     $event_date_format = get_option('date_format');
     $event_time_format = get_option('time_format');
     $event_all_day = get_post_meta(get_the_ID(), '_EventAllDay', true);
     $event_start_date = tribe_get_start_date(get_the_ID(), false, $event_date_format);
     $event_start_time = tribe_get_start_date(get_the_ID(), false, $event_time_format);
     $event_end_date = tribe_get_end_date(get_the_ID(), false, $event_date_format);
     $event_end_time = tribe_get_end_date(get_the_ID(), false, $event_time_format);
     $separator = apply_filters("metaslider_tribe_separator", " - ");
     if ($event_all_day) {
         if ($event_start_date == $event_end_date) {
             $event_string = $event_start_date;
         } else {
             $event_string = $event_start_date . $separator . $event_end_date;
         }
     } else {
         if ($event_start_date == $event_end_date) {
             $event_string = $event_start_date . " " . $event_start_time . $separator . $event_end_time;
         } else {
             $event_string = $event_start_date . $separator . $event_end_date;
         }
     }
     $content = str_replace("{event_date}", $event_string, $content);
     $content = str_replace("{event_start_date}", $event_start_date, $content);
     $content = str_replace("{event_start_time}", $event_start_time, $content);
     $content = str_replace("{event_end_time}", $event_end_time, $content);
     $content = str_replace("{event_end_date}", $event_end_date, $content);
     $content = str_replace("{event_address}", tribe_get_address(get_the_ID()), $content);
     $content = str_replace("{event_city}", tribe_get_city(get_the_ID()), $content);
     $content = str_replace("{event_country}", tribe_get_country(get_the_ID()), $content);
     $content = str_replace("{event_full_address}", tribe_get_full_address(get_the_ID()), $content);
     $content = str_replace("{event_phone}", tribe_get_phone(get_the_ID()), $content);
     $content = str_replace("{event_province}", tribe_get_province(get_the_ID()), $content);
     $content = str_replace("{event_region}", tribe_get_region(get_the_ID()), $content);
     $content = str_replace("{event_state}", tribe_get_state(get_the_ID()), $content);
     $content = str_replace("{event_stateprovince}", tribe_get_stateprovince(get_the_ID()), $content);
     $content = str_replace("{event_venue}", tribe_get_venue(get_the_ID()), $content);
     $content = str_replace("{event_venue_id}", tribe_get_venue_id(get_the_ID()), $content);
     $content = str_replace("{event_venue_link}", tribe_get_venue_link(get_the_ID(), false), $content);
     $content = str_replace("{event_zip}", tribe_get_zip(get_the_ID()), $content);
     return $content;
 }
开发者ID:aguidetta,项目名称:Enduris,代码行数:50,代码来源:slide.php


示例13: generate_markers

 /**
  * Generates the array of markers to pin the events in the Google Map embed in the map view
  *
  * @param $events
  *
  * @return array
  */
 public function generate_markers($events)
 {
     $markers = array();
     // let's track which recurrence venues have already been marked
     $already_marked = 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);
         // let's keep track of the post ID/address combos that we've set markers for. If we get a
         // duplicate (a recurrence post with the same address), let's skip it.
         $location_id_hash = md5($address . ($event->post_parent ? $event->post_parent : $event->ID));
         if (!empty($already_marked[$location_id_hash])) {
             continue;
         }
         $already_marked[$location_id_hash] = true;
         // 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:TravisSperry,项目名称:mpa_website,代码行数:33,代码来源:Geo_Loc.php


示例14: die

 * @since  2.1
 * @author Modern Tribe Inc.
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
$postId = get_the_ID();
$address_out = array();
?>
<span class="adr">

<?php 
// Get our street address
if (tribe_get_address($postId)) {
    $address_out[] = '<span class="street-address">' . tribe_get_address($postId) . '</span>';
    if (!tribe_is_venue()) {
        $address_out[] = '<span class="delimiter">,</span> ';
    }
}
// Get our full region
$our_province = tribe_get_event_meta($postId, '_VenueStateProvince', true);
$our_states = TribeEventsViewHelpers::loadStates();
$our_full_region = isset($our_states[$our_province]) ? $our_states[$our_province] : $our_province;
// Get our city
if (tribe_get_city($postId)) {
    $address_out[] = ' <span class="locality">' . tribe_get_city($postId) . '</span>';
    $address_out[] = '<span class="delimiter">,</span> ';
}
// Get our region
if (tribe_get_region($postId)) {
开发者ID:TyRichards,项目名称:river_of_life,代码行数:31,代码来源:address.php


示例15: tribe_get_organizer_phone

        ?>
				<div class="row">
					<dt>Phone:</dt>
					<dd><?php 
        echo tribe_get_organizer_phone();
        ?>
</dd>
				</div>
				<?php 
    }
    ?>
				
				<div class="row">
					<dt>Address:</dt>
					<dd><?php 
    echo tribe_get_address(get_the_ID());
    ?>
,  <?php 
    echo tribe_get_state(get_the_ID());
    ?>
, <?php 
    echo tribe_get_zip(get_the_ID());
    ?>
</dd>
				</div>
				
					<?php 
    if (tribe_get_event_website_link()) {
        ?>
						<div class="row">
							<dt>Website:</dt>
开发者ID:TyRichards,项目名称:river_of_life,代码行数:31,代码来源:single-event.php


示例16: widget

    function widget($args, $instance)
    {
        extract($args);
        extract($instance);
        // DEFAULTS
        if (empty($instance)) {
            $widget_title = __('Event', "loc_sport_widgets_plugin");
            $excerpt_length = 650;
            // get events
            $events = tribe_get_events(array('eventDisplay' => 'all', 'orderby' => 'post_date', 'order' => 'DESC', 'numberposts' => 1));
            $event_ID = $events[0]->ID;
        }
        $cost = tribe_get_formatted_cost($event_ID);
        // WPML
        if (function_exists('icl_translate')) {
            $widget_title = icl_translate('loc_sport_widgets_plugin', "{$widget_id}-widget[widget_title]", $widget_title);
        }
        if (function_exists('icl_translate')) {
            $cost = icl_translate('loc_sport_widgets_plugin', "{$widget_id}-widget[cost]", $cost);
        }
        if (!isset($event_ID) || empty($event_ID)) {
            return;
        }
        $event = get_post($event_ID);
        ?>

			<?php 
        echo $before_widget;
        ?>

			<?php 
        if (!empty($widget_title)) {
            echo $before_title . $widget_title . $after_title;
        }
        ?>

            	<!-- Start Post --> 
            	<div class="clearfix tribe-events-tcblock">

					<!-- Event Cost -->
					<div class="tribe-events-event-cost">
						<span><?php 
        echo $cost;
        ?>
</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>
									<span class="delimiter">,</span>  
									<span class="postal-code"><?php 
        echo tribe_get_zip($event_ID);
        ?>
</span> 
//.........这里部分代码省略.........
开发者ID:jameymcelveen,项目名称:com.flyingtigersrc.www,代码行数:101,代码来源:widget_sport_single_event.php


示例17: die

 * 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;
}
if (!isset($event)) {
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:venue.php


示例18: tribe_address_exists

 /**
  * Address Test
  *
  * Returns true if any of the following exist: address, city, state/province (region), country or zip
  *
  * @param int $postId Can supply either event id or venue id, if none specified, current post is used
  *
  * @return bool True if any part of an address exists
  */
 function tribe_address_exists($postId = null)
 {
     if (tribe_get_address($postId) || tribe_get_city($postId) || tribe_get_region($postId) || tribe_get_country($postId) || tribe_get_zip($postId) || tribe_is_venue_overwrite($postId) && tribe_get_coordinates($postId)) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:17,代码来源:venue.php


示例19:

    ?>
</span>
		<?php 
    if (!tribe_is_venue()) {
        ?>
		<?php 
    }
    ?>
	<?php 
}
?>

	<?php 
// This locations's city.
if (tribe_get_city($venue_id)) {
    if (tribe_get_address($venue_id)) {
        ?>
		<?php 
    }
    ?>
		<span class="locality"><?php 
    echo tribe_get_city($venue_id);
    ?>
</span><span class="delimiter">,</span>
	<?php 
}
?>

	<?php 
// This location's abbreviated region. Full region name in the element title.
if (tribe_get_region($venue_id)) {
开发者ID:alexmacarthur,项目名称:LyonCountyRepublicans,代码行数:31,代码来源:address.php


示例20: generate_ical_feed

 /**
  * Generates the iCal file
  *
  * @static
  *
  * @param int|null $post If you want the ical file for a single event
  */
 public static function generate_ical_feed($post = null)
 {
     $tec = Tribe__Events__Main::instance();
     $events = '';
     $blogHome = get_bloginfo('url');
     $blogName = get_bloginfo('name');
     if ($post) {
         $events_posts = is_array($post) ? $post : array($post);
     } else {
         if (tribe_is_month()) {
             $events_posts = self::get_month_view_events();
         } else {
             global $wp_query;
             $events_posts = $wp_query->posts;
         }
     }
     $event_ids = wp_list_pluck($events_posts, 'ID');
     foreach ($events_posts as $event_post) {
         // add fields to iCal output
         $item = array();
         $full_format = 'Ymd\\THis';
         $time = (object) array('start' => self::wp_strtotime($event_post->EventStartDate), 'end' => self::wp_strtotime($event_post->EventEndDate), 'modified' => self::wp_strtotime($event_post->post_modified), 'created' => self::wp_strtotime($event_post->post_date));
         if ('yes' == get_post_meta($event_post->ID, '_EventAllDay', true)) {
             $type = 'DATE';
             $format = 'Ymd';
         } else {
             $type = 'DATE-TIME';
             $format = $full_format;
         }
         $tzoned = (object) array('start' => date($format, $time->start), 'end' => date($format, $time->end), 'modified' => date($format, $time->modified), 'created' => date($format, $time->created));
         if ('DATE' === $type) {
             $item[] = "DTSTART;VALUE={$type}:" . $tzoned->start;
             $item[] = "DTEND;VALUE={$type}:" . $tzoned->end;
         } else {
             $tz = get_option('timezone_string');
             $item[] = 'DTSTART;TZID="' . $tz . '":' . $tzoned->start;
             $item[] = 'DTEND;TZID="' . $tz . '":' . $tzoned->end;
         }
         $item[] = 'DTSTAMP:' . date($full_format, time());
         $item[] = 'CREATED:' . $tzoned->created;
         $item[] = 'LAST-MODIFIED:' . $tzoned->modified;
         $item[] = 'UID:' . $event_post->ID . '-' . $time->start . '-' . $time->end . '@' . parse_url(home_url('/'), PHP_URL_HOST);
         $item[] = 'SUMMARY:' . str_replace(array(',', "\n", "\r", "\t"), array('\\,', '\\n', '', '\\t'), html_entity_decode(strip_tags($event_post->post_title), ENT_QUOTES));
         $item[] = 'DESCRIPTION:' . str_replace(array(',', "\n", "\r", "\t"), array('\\,', '\\n', '', '\\t'), html_entity_decode(strip_tags($event_post->post_content), ENT_QUOTES));
         $item[] = 'URL:' . get_permalink($event_post->ID);
         // add location if available
         $location = $tec->fullAddressString($event_post->ID);
         if (!empty($location)) {
             $str_location = str_replace(array(',', "\n"), array('\\,', '\\n'), html_entity_decode($location, ENT_QUOTES));
             $item[] = 'LOCATION:' . $str_location;
         }
         // add geo coordinates if available
         if (class_exists('Tribe__Events__Pro__Geo_Loc')) {
             $long = Tribe__Events__Pro__Geo_Loc::instance()->get_lng_for_event($event_post->ID);
             $lat = Tribe__Events__Pro__Geo_Loc::instance()->get_lat_for_event($event_post->ID);
             if (!empty($long) && !empty($lat)) {
                 $item[] = sprintf('GEO:%s;%s', $lat, $long);
                 $str_title = str_replace(array(',', "\n"), array('\\,', '\\n'), html_entity_decode(tribe_get_address($event_post->ID), ENT_QUOTES));
                 if (!empty($str_title) && !empty($str_location)) {
                     $item[] = 'X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=' . str_replace('\\,', '', trim($str_location)) . ';' . 'X-APPLE-RADIUS=500;' . 'X-TITLE=' . trim($str_title) . ':geo:' . $long . ',' . $lat;
                 }
             }
         }
         // add categories if available
         $event_cats = (array) wp_get_object_terms($event_post->ID, Tribe__Events__Main::TAXONOMY, array('fields' => 'names'));
         if (!empty($event_cats)) {
             $item[] = 'CATEGORIES:' . html_entity_decode(join(',', $event_cats), ENT_QUOTES);
         }
         // add featured image if available
         if (has_post_thumbnail($event_post->ID)) {
             $thumbnail_id = get_post_thumbnail_id($event_post->ID);
             $thumbnail_url = wp_get_attachment_url($thumbnail_id);
             $thumbnail_mime_type = get_post_mime_type($thumbnail_id);
             $item[] = apply_filters('tribe_ical_feed_item_thumbnail', sprintf('ATTACH;FMTTYPE=%s:%s', $thumbnail_mime_type, $thumbnail_url), $event_post->ID);
         }
         // add organizer if available
         $organizer_email = tribe_get_organizer_email($event_post->ID);
         if ($organizer_email) {
             $organizer_id = tribe_get_organizer_id($event_post->ID);
             $organizer = get_post($organizer_id);
             if ($organizer_id) {
                 $item[] = sprintf('ORGANIZER;CN="%s":MAILTO:%s', rawurlencode($organizer->post_title), $organizer_email);
             } else {
                 $item[] = sprintf('ORGANIZER:MAILTO:%s', $organizer_email);
             }
         }
         $item = apply_filters('tribe_ical_feed_item', $item, $event_post);
         $events .= "BEGIN:VEVENT\r\n" . implode("\r\n", $item) . "\r\nEND:VEVENT\r\n";
     }
     header('Content-type: text/calendar; charset=UTF-8');
     header('Content-Disposition: attachment; filename="ical-event-' . implode($event_ids) . '.ics"');
     $content = "BEGIN:VCALENDAR\r\n";
     $content .= "VERSION:2.0\r\n";
//.........这里部分代码省略.........
开发者ID:AC85,项目名称:musikschule-wp-theme,代码行数:101,代码来源:iCal.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tribe_get_city函数代码示例发布时间:2022-05-23
下一篇:
PHP tribe_format_date函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap