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


PHP tribe_get_country函数代码示例

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


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

示例1: block_tribe_event_output


//.........这里部分代码省略.........
								</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> 
												<span class="country-name"><?php 
    echo tribe_get_country($event_ID);
    ?>
</span>
											</span>
										</address>

										<?php 
    printf('<a class="tribe-events-gmap" href="%s" title="Click to view a Google Map" target="_blank">- Google Map</a>', esc_url(tribe_get_map_link($event_ID)));
    ?>
	
									</div> <!-- .tribe-events-venue-details -->

								</div><!-- .tribe-events-event-meta -->

								
								
								<!-- Event Content -->
								<div class="tribe-events-list-event-description tribe-events-content description entry-summary">

									
									<?php 
    $event_excerpt = !empty($event->post_excerpt) ? do_shortcode($event->post_excerpt) : mb_make_excerpt($event->post_content, $default_excerpt_length, true);
    // excerpt
    echo "<p>";
    echo $event_excerpt;
    echo "</p>";
    // read more
    printf('<a href="%s" class="tribe-events-read-more" rel="bookmark">%s &raquo;</a>', esc_url(tribe_get_event_link($event_ID)), esc_attr(__('Find out more', "loc_sport_core_plugin")));
    ?>


									
								</div><!-- .tribe-events-list-event-description -->
	                         
	                        </div>


	                    </div>
	                    <!-- end main-content -->
	                </div>
	                <!-- end main wrapper -->
	            </div>
	             <!-- end main-container -->
	        </div>
	        <!-- end outter-wrapper -->
	        
		<!-- END BLOCK -->
		
		<?php 
    return true;
}
开发者ID:jameymcelveen,项目名称:com.flyingtigersrc.www,代码行数:101,代码来源:block_tribe_event_output.php

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

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

示例4: tribe_get_region

 /**
  * Region
  *
  * Returns the state or province for US or non-US addresses (effectively the same thing as tribe_get_stateprovince())
  *
  * @param int $postId Can supply either event id or venue id, if none specified, current post is used
  *
  * @return string
  * @todo Depricate tribe_get_region or tribe_get_stateprovince
  */
 function tribe_get_region($postId = null)
 {
     $postId = tribe_get_venue_id($postId);
     if (tribe_get_event_meta($postId, '_VenueStateProvince', true)) {
         $region = tribe_get_event_meta($postId, '_VenueStateProvince', true);
     } else {
         if (tribe_get_country($postId) == __('United States', 'tribe-events-calendar')) {
             $region = tribe_get_state($postId);
         } else {
             $region = tribe_get_province();
         }
     }
     return apply_filters('tribe_get_region', $region);
 }
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:24,代码来源:venue.php

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

示例6: tribe_get_zip

    ?>
</abbr>
	<?php 
}
?>

	<?php 
// This location's postal code.
if (tribe_get_zip($venue_id)) {
    ?>
		<span class="postal-code"><?php 
    echo tribe_get_zip($venue_id);
    ?>
</span>
	<?php 
}
?>

	<?php 
// This location's country.
if (tribe_get_country($venue_id)) {
    ?>
		<span class="country-name"><?php 
    echo tribe_get_country($venue_id);
    ?>
</span>
	<?php 
}
?>

</span>
开发者ID:alexmacarthur,项目名称:LyonCountyRepublicans,代码行数:31,代码来源:address.php

示例7: sp_get_country

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

示例8: widget


//.........这里部分代码省略.........
</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> 
									<span class="country-name"><?php 
        echo tribe_get_country($event_ID);
        ?>
</span>
								</span>
							</address>

							<?php 
        printf('<a class="tribe-events-gmap" href="%s" title="Click to view a Google Map" target="_blank">- Google Map</a>', esc_url(tribe_get_map_link($event_ID)));
        ?>

						</div> <!-- .tribe-events-venue-details -->

					</div><!-- .tribe-events-event-meta -->

					
					
					<!-- Event Content -->
					<div class="tribe-events-list-event-description tribe-events-content description entry-summary">

						
						<?php 
        $event_excerpt = !empty($event->post_excerpt) ? do_shortcode($event->post_excerpt) : mb_make_excerpt($event->post_content, $excerpt_length, true);
        // excerpt
        echo "<p>";
        echo $event_excerpt;
        echo "</p>";
        // read more
        printf('<a href="%s" class="tribe-events-read-more" rel="bookmark">%s &raquo;</a>', esc_url(tribe_get_event_link($event_ID)), esc_attr(__('Find out more', "loc_sport_widgets_plugin")));
        ?>


						
					</div><!-- .tribe-events-list-event-description -->
                 
                </div>

			<?php 
        echo $after_widget;
        ?>


			<?php 
    }
开发者ID:jameymcelveen,项目名称:com.flyingtigersrc.www,代码行数:101,代码来源:widget_sport_single_event.php

示例9: die

 *
 * @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)) {
    $event = null;
}
?>
开发者ID:donwea,项目名称:nhap.org,代码行数:30,代码来源:venue.php

示例10: tribe_get_zip

		<?php 
if ($zip && tribe_get_zip() != '') {
    ?>
			<span class="postal-code"><?php 
    echo tribe_get_zip();
    ?>
</span>
		<?php 
}
?>

		<?php 
if ($country && tribe_get_country() != '') {
    ?>
			<span class="country-name"><?php 
    echo tribe_get_country();
    ?>
</span>
		<?php 
}
?>

		<?php 
if ($organizer && tribe_get_organizer() != '') {
    ?>
		<?php 
    _e('Organizer:', 'tribe-events-calendar-pro');
    ?>
				<span class="tribe-organizer"><?php 
    echo tribe_get_organizer_link();
    ?>
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:31,代码来源:list-widget.php

示例11: tribe_get_region

}
if ($region && tribe_get_region()) {
    $output .= !$city ? '<br />' : '';
    $space = true;
    $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;
?>
开发者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: tribe_get_event_meta

        $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)) {
    if (count($address_out)) {
        $address_out[] = ' <abbr class="region tribe-events-abbr" title="' . $our_full_region . '">' . tribe_get_region($postId) . '</abbr>';
    }
}
// Get our postal code
if (tribe_get_zip($postId)) {
    $address_out[] = ' <span class="postal-code">' . tribe_get_zip($postId) . '</span>';
}
// Get our country
if (tribe_get_country($postId)) {
    if (count($address_out)) {
        $address_out[] = ' <span class="country-name">' . tribe_get_country($postId) . '</span>';
    }
}
echo implode('', $address_out);
?>
</span>
开发者ID:TyRichards,项目名称:river_of_life,代码行数:31,代码来源:address.php

示例14: tribe_get_zip

	<?php 
if (tribe_get_zip($postId)) {
    ?>
		<?php 
    $address_out[] = '<span itemprop="postalCode">' . tribe_get_zip($postId) . '</span>';
    ?>
	<?php 
}
?>

	<?php 
if (tribe_get_country($postId)) {
    ?>
		<?php 
    $address_out[] = '<span itemprop="addressCountry">' . tribe_get_country($postId) . '</span>';
    ?>
	<?php 
}
?>

	<?php 
if (count($address_out) > 0) {
    ?>
	<?php 
    echo implode(', ', $address_out);
    ?>
	<?php 
}
?>
</div>
开发者ID:EfncoPlugins,项目名称:the-events-calendar,代码行数:30,代码来源:full-address.php


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