本文整理汇总了PHP中tribe_get_full_address函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_get_full_address函数的具体用法?PHP tribe_get_full_address怎么用?PHP tribe_get_full_address使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_get_full_address函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: build_data
/**
* Compile the schema.org event data into an array
*/
protected function build_data()
{
global $post;
$id = $post->ID;
$lat = tribe_get_event_meta($id, Tribe__Events__Pro__Geo_Loc::LAT);
$lng = tribe_get_event_meta($id, Tribe__Events__Pro__Geo_Loc::LNG);
$venue_data = parent::build_data();
$venue_data[$id]->{'@type'} = 'Place';
$venue_data[$id]->address = strip_tags(str_replace("\n", '', tribe_get_full_address($post->ID)));
$venue_data[$id]->url = esc_js(tribe_get_event_meta($id, '_VenueURL', true));
$venue_data[$id]->telephone = esc_js(tribe_get_event_meta($id, '_VenuePhone', true));
if ($lat && $lng) {
$venue_data[$id]->geo = new stdClass();
$venue_data[$id]->geo->{'@type'} = 'GeoCoordinates';
$venue_data[$id]->geo->latitude = esc_js($lat);
$venue_data[$id]->geo->longitude = esc_js($lng);
}
return $venue_data;
}
示例4: tribe_get_map_link
<?php
if (get_post_meta(get_the_ID(), '_EventShowMapLink', true) == 'true') {
?>
<a class="gmap" itemprop="maps" href="<?php
echo tribe_get_map_link();
?>
" title="Click to view a Google Map" target="_blank"><?php
_e('Google Map', 'tribe-events-calendar');
?>
</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>
示例5: tribe_events_event_classes
<?php $event_id = $event->ID; ?>
<div class="single-event-popup <?php echo tribe_events_event_classes( $event_id ); ?>">
<div class="col-sm-4">
<?php echo tribe_event_featured_image( $event_id, 'event-popup', false ); ?>
</div>
<div class="col-sm-8">
<h2 class="event-title"><?php echo $event->post_title; ?></h2>
<?php echo apply_filters( 'the_content', $event->post_content ); ?>
<ul class="meta-info">
<li><label>What:</label> <?php echo $event->post_title; ?></li>
<li><label>When:</label> <?php echo tribe_events_event_schedule_details( $event_id ); ?></li>
<?php if ( tribe_address_exists( $event_id ) ) : ?>
<li><label>Where:</label> <?php echo tribe_get_full_address( $event_id ); ?></li>
<?php endif; ?>
<li><label>Cost:</label> <?php echo get_post_meta( $event_id, '_ecp_custom_2', true ); ?></li>
<?php if ( tribe_has_organizer( $event_id ) ): ?>
<li><label>Info:</label> <a href="mailto:<?php echo tribe_get_organizer_email( $event_id ); ?>"><?php echo tribe_get_organizer_email( $event_id ); ?></a></li>
<?php endif; ?>
<li><label>Register:</label> <?php echo get_post_meta( $event_id, '_ecp_custom_5', true ); ?></li>
</ul>
<?php echo bones_get_edit_link( $event_id ); ?>
</div>
</div>
示例6: 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');
}
}
示例7: tribe_get_venue_details
/**
* Gets venue details for use in some single-event templates.
*
* @param null $post_id
*
* @return array The venue name and venue address.
*/
function tribe_get_venue_details($post_id = null)
{
$post_id = Tribe__Main::post_id_helper($post_id);
if (!$post_id) {
return array();
}
$venue_details = array();
if ($venue_link = tribe_get_venue_link($post_id)) {
$venue_details['linked_name'] = $venue_link;
}
if ($venue_address = tribe_get_full_address($post_id)) {
$venue_details['address'] = $venue_address;
}
return apply_filters('tribe_get_venue_details', $venue_details);
}
示例8: do_action
?>
</span> </h3>
<div class="widget-content">
<dl>
<?php
do_action('tribe_events_single_meta_venue_section_start');
?>
<dd class="author fn org"> <?php
echo tribe_get_venue();
?>
</dd>
<div class="clearfix"></div>
<?php
// Do we have an address?
$address = tribe_address_exists() ? '<address class="tribe-events-address">' . tribe_get_full_address() . '</address>' : '';
// Do we have a Google Map link to display?
$gmap_link = tribe_show_google_map_link() ? tribe_get_map_link_html() : '';
$gmap_link = apply_filters('tribe_event_meta_venue_address_gmap', $gmap_link);
// Display if appropriate
if (!empty($address)) {
echo '<dd class="location">' . "{$address} {$gmap_link} </dd>";
echo '<div class="clearfix"></div>';
}
?>
<?php
if (!empty($phone)) {
?>
<dt> <?php
esc_html_e('Phone:', 'training');
示例9: urlencode
$sURL = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . urlencode($sQuery) . '&sensor=false®ion=' . $sCountry . '&language=' . $sCountry;
$sData = file_get_contents($sURL);
return json_decode($sData);
}
if ($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
$imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), "Full");
if (get_post_meta($post->ID, 'furu_youtube', $single = true)) {
$url = get_post_meta($post->ID, 'furu_youtube', $single = true);
$url = $url ? str_replace("watch?", "", $url) : "";
$url = $url ? preg_replace($replaceWords, "v/", $url) : "";
}
$taxonomy = strip_tags(get_the_term_list($post->ID, 'loctype'));
$postId = $post->ID;
$addressw = tribe_get_full_address([$includeVenueName = false]);
$addresser = trim(preg_replace('/\\s\\s+/', '', $addressw));
$addressers = preg_replace('/<\\/span>/', ' ', $addresser);
$addressees = preg_replace('/<\\/abbr>/', ' ', $addressers);
$coords = getCoordinatesFromAddress('105 Covington Street , Panama City Beach , FL 32408 United States');
$lat = $coords->results[0]->geometry->location->lat;
$long = $coords->results[0]->geometry->location->lng;
$fullco = $lat . ',' . $long;
if (tribe_has_venue()) {
$results["places"][$key]["name"] = get_the_title();
$results["places"][$key]["photo"] = sp_get_image();
$results["places"][$key]["desc"] = get_the_excerpt();
$results["places"][$key]["cater"] = 'events';
$results["places"][$key]["coords"] = $fullco;
$results["places"][$key]["permalink"] = get_post_meta($post->ID, 'cebo_outbound', $single = true);
$results["places"][$key]["address"] = get_post_meta($post->ID, 'cebo_phone', $single = true);
示例10: 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;
}
示例11: the_title
" title="<?php
the_title();
?>
" rel="bookmark">
<?php
the_title();
?>
</a>
</h4>
<?php
do_action('tribe_events_after_the_event_title');
?>
</div>
<?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 {
示例12: esc_html_e
</td>
<td class="class-details" valign="top" align="left" width="50%" style="padding: 0; width:50%; 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('Phone', 'event-tickets');
?>
</h6>
<span style="color:#0a0a0e !important; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size:15px;"><?php
echo $venue_phone;
?>
</span>
</td>
</tr>
</table>
</div>
<?php
$venue_address = tribe_get_full_address($event_id);
?>
<div class="tribe-events-meta-group tribe-events-meta-group-details" id="tribe-events-inst-meta-bottom">
<?php
$map = "http://maps.googleapis.com/maps/api/staticmap?key=AIzaSyBWJnZ6_W8nuF4gTP0Q104-Ubo46uaJEZ4¢er=" . urlencode(strip_tags($venue_address)) . "&zoom=14&size=600x200&markers=color:red%7C" . urlencode(strip_tags($venue_address));
?>
<a href="<?php
tribe_get_map_link($event_id);
?>
" style="max-width: 100%;"><img src="<?php
echo $map;
?>
" alt="<?php
echo tribe_get_venue($event_id);
?>
" style="margin:auto; width:100%;"></a>
示例13: die
* a single-venue.php file in a tribe-events/pro/ directory within your theme directory, which
* will override the /views/pro/single-venue.php.
*
* You can use any or all filters included in this file or create your own filters in
* your functions.php. In order to modify or extend a single filter, please see our
* readme on templates hooks and filters (TO-DO)
*
* @package TribeEventsCalendarPro
*
* @version 4.3
*/
if (!defined('ABSPATH')) {
die('-1');
}
$venue_id = get_the_ID();
$full_address = tribe_get_full_address();
$telephone = tribe_get_phone();
$website_link = tribe_get_venue_website_link();
while (have_posts()) {
the_post();
?>
<div class="tribe-events-venue">
<p class="tribe-events-back">
<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>
示例14: get_the_post_thumbnail
?>
</div>
<?php
if (has_post_thumbnail($venue_ID)) {
?>
<div class="tribe-venue-widget-thumbnail">
<?php
echo get_the_post_thumbnail($venue_ID, 'related-event-thumbnail');
?>
</div>
<?php
}
?>
<div class="tribe-venue-widget-address">
<?php
echo tribe_get_full_address($venue_ID, true);
?>
</div>
</div>
<?php
if (0 === $events->post_count) {
?>
<?php
printf(__('No upcoming %s.', 'tribe-events-calendar-pro'), $events_label_plural_lowercase);
?>
<?php
} else {
?>
<?php
do_action('tribe_events_venue_widget_before_the_list');
?>
示例15: tribe_the_full_address
/**
* @deprecated
*/
function tribe_the_full_address($postId = null, $includeVenueName = false)
{
_deprecated_function(__FUNCTION__, '2.0.1', 'echo tribe_get_full_address()');
echo tribe_get_full_address($postId);
}