本文整理汇总了PHP中tribe_get_phone函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_get_phone函数的具体用法?PHP tribe_get_phone怎么用?PHP tribe_get_phone使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_get_phone函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
示例2: tribe_get_phone
<?php
/**
* Single Event Meta (Venue) Template
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe-events/modules/meta/venue.php
*
* @package TribeEventsCalendar
*/
if (!tribe_get_venue_id()) {
return;
}
$phone = tribe_get_phone();
$website = tribe_get_venue_website_link();
?>
<div class="widget tribe-events-meta-group tribe-events-meta-group-venue">
<h3 class="widget-title special font-size-sm separator_align_left tribe-events-single-section-title"> <span><?php
echo tribe_get_venue_label_singular();
?>
</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();
?>
示例3: sp_get_phone
/**
* @deprecated
*/
function sp_get_phone($postId = null)
{
_deprecated_function(__FUNCTION__, '2.0', 'tribe_get_phone()');
return tribe_get_phone($postId);
}
示例4: 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;
}
示例5: _e
}
?>
</dd>
<?php
}
?>
<?php
if (tribe_get_phone()) {
?>
<dt class="event-label event-label-venue-phone"><?php
_e('Phone:', 'tribe-events-calendar');
?>
</dt>
<dd itemprop="telephone" class="event-meta event-meta-venue-phone"><?php
echo tribe_get_phone();
?>
</dd>
<?php
}
?>
<?php
if (tribe_address_exists(get_the_ID())) {
?>
<dt class="event-label event-label-address">
<?php
_e('Address:', 'tribe-events-calendar');
?>
<br />
</dt>
示例6: tribe_get_venue
echo tribe_get_venue($event_id);
?>
</div>
<div class="venue-address">
<strong><?php
_e('Address:', 'the-events-calendar');
?>
</strong>
<?php
echo tribe_get_full_address($venue_id);
?>
</div>
<?php
if ($phone = tribe_get_phone($venue_id)) {
?>
<div class="venue-phone">
<strong><?php
echo esc_html(__('Phone:', 'the-events-calendar'));
?>
</strong>
<?php
echo esc_html($phone);
?>
</div>
<?php
}
//end if
if ($url = esc_url(get_post_meta($venue_id, '_VenueURL', true))) {
?>
示例7: event_details_top
/**
* Injects event meta data into the Attendees report
*/
public function event_details_top($event_id)
{
if (Tribe__Events__Main::POSTTYPE !== get_post_type($event_id)) {
return;
}
$url = null;
if (tribe_has_venue($event_id)) {
$venue_id = tribe_get_venue_id($event_id);
$url = get_post_meta($venue_id, '_VenueURL', true);
if ($url) {
$url_path = @parse_url($url, PHP_URL_PATH);
$display_url = @parse_url($url, PHP_URL_HOST);
$display_url .= empty($url_path) && $url_path !== '/' ? '/…' : '';
$display_url = apply_filters('tribe_venue_display_url', $display_url, $url, $venue_id);
}
}
?>
<li>
<strong><?php
esc_html_e('Start Date / Time:', 'event-tickets');
?>
</strong>
<?php
echo tribe_get_start_date($event_id, false, tribe_get_datetime_format(true));
?>
</li>
<li>
<strong><?php
esc_html_e('End Date / Time:', 'event-tickets');
?>
</strong>
<?php
echo tribe_get_end_date($event_id, false, tribe_get_datetime_format(true));
?>
</li>
<?php
if (tribe_has_venue($event_id)) {
?>
<li class="venue-name">
<strong><?php
echo tribe_get_venue_label_singular();
?>
: </strong>
<a href="<?php
echo get_edit_post_link($venue_id);
?>
" title="<?php
esc_html_e('Edit Venue', 'the-events-calendar');
?>
"><?php
echo tribe_get_venue($event_id);
?>
</a>
</li>
<li class="venue-address">
<strong><?php
_e('Address:', 'the-events-calendar');
?>
</strong>
<?php
echo tribe_get_full_address($venue_id);
?>
</li>
<?php
if ($phone = tribe_get_phone($venue_id)) {
?>
<li class="venue-phone">
<strong><?php
echo esc_html(__('Phone:', 'the-events-calendar'));
?>
</strong>
<?php
echo esc_html($phone);
?>
</li>
<?php
}
//end if
if ($url) {
?>
<li class="venue-url">
<strong><?php
echo esc_html(__('Website:', 'the-events-calendar'));
?>
</strong>
<a target="_blank" href="<?php
echo esc_url($url);
?>
">
<?php
echo esc_html($display_url);
?>
</a>
//.........这里部分代码省略.........
示例8: tribe_get_region
$output .= tribe_get_region();
} else {
$output = rtrim($output, ', ');
}
if ($zip && tribe_get_zip() != '') {
$output .= $space ? '<br />' : '';
$output .= tribe_get_zip();
$space = true;
}
if ($country && tribe_get_country() != '') {
$output .= $space ? '<br />' : ' ';
$output .= tribe_get_country();
}
if ($phone && tribe_get_phone() != '') {
if ($output) {
$output .= '<br/>';
}
$output .= tribe_get_phone();
}
if ($cost && tribe_get_cost() != '') {
if ($output) {
$output .= '<br/>';
}
$output .= __('Price:', 'tribe-events-calendar-pro') . ' ' . tribe_get_cost();
}
echo $output;
?>
</div>
</li>
<?php
$alt_text = empty($alt_text) ? 'alt' : '';
示例9: 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;
}
示例10: die
* 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>
</p>