本文整理汇总了PHP中tribe_get_meta函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_get_meta函数的具体用法?PHP tribe_get_meta怎么用?PHP tribe_get_meta使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_get_meta函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: die
* @author Modern Tribe Inc.
*
*/
if (!defined('ABSPATH')) {
die('-1');
}
?>
<?php
global $post;
// Setup an array of venue details for use later in the template
$venue_details = array();
if ($venue_name = tribe_get_meta('tribe_event_venue_name')) {
$venue_details[] = $venue_name;
}
if ($venue_address = tribe_get_meta('tribe_event_venue_address')) {
$venue_details[] = $venue_address;
}
// Venue microformats
$has_venue_address = $venue_address ? ' location' : '';
// Organizer
$organizer = tribe_get_organizer();
?>
<!-- Event Image -->
<?php
echo tribe_event_featured_image(null, 'medium');
?>
<!-- Event Time -->
<?php
开发者ID:chicosilva,项目名称:olharambiental,代码行数:31,代码来源:single-event+(1).php
示例2: 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()
{
$venue_details = array();
if ($venue_name = tribe_get_meta('tribe_event_venue_name')) {
$venue_details['name'] = $venue_name;
}
if ($venue_address = tribe_get_meta('tribe_event_venue_address')) {
$venue_details['address'] = $venue_address;
}
return apply_filters('tribe_get_venue_details', $venue_details);
}
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:18,代码来源:venue.php
示例3: the_title
?>
<?php
the_title('<h2 class="entry-title author fn org">', '</h2>');
?>
<?php
do_action('tribe_events_single_venue_after_title');
?>
<div class="tribe-events-event-meta">
<?php
if (tribe_show_google_map_link() && tribe_address_exists()) {
?>
<!-- Google Map Link -->
<?php
echo tribe_get_meta('tribe_event_venue_gmap_link');
?>
<?php
}
?>
<!-- Venue Meta -->
<?php
do_action('tribe_events_single_venue_before_the_meta');
?>
<?php
echo tribe_get_meta_group('tribe_event_venue');
?>
<?php
do_action('tribe_events_single_venue_after_the_meta');
?>
开发者ID:simple-beck,项目名称:project-gc,代码行数:31,代码来源:single-venue.php
示例4: tribe_events_single_event_meta
/**
* Return the single event meta
*
* @deprecated since 3.6
* @todo remove in 3.9
* @return string
**/
function tribe_events_single_event_meta()
{
// Use the new template driven approach to rendering meta data unless the user opts to use the old system
if (!apply_filters('tribe_events_single_event_meta_legacy_mode', false)) {
tribe_get_template_part('modules/meta');
return '';
}
// For users using the meta factory ("legacy mode")...
$event_id = get_the_ID();
$skeleton_mode = apply_filters('tribe_events_single_event_the_meta_skeleton', false, $event_id);
$group_venue = apply_filters('tribe_events_single_event_the_meta_group_venue', false, $event_id);
$html = '';
if ($skeleton_mode) {
// show all visible meta_groups in skeleton view
$html .= tribe_get_the_event_meta();
} else {
$html .= '<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">';
// Event Details
$html .= tribe_get_meta_group('tribe_event_details');
// When there is no map show the venue info up top
if (!$group_venue && !tribe_embed_google_map($event_id)) {
// Venue Details
$html .= tribe_get_meta_group('tribe_event_venue');
$group_venue = false;
} else {
if (!$group_venue && !tribe_has_organizer($event_id) && tribe_address_exists($event_id) && tribe_embed_google_map($event_id)) {
$html .= sprintf('%s<div class="tribe-events-meta-group tribe-events-meta-group-gmap">%s</div>', tribe_get_meta_group('tribe_event_venue'), tribe_get_meta('tribe_venue_map'));
$group_venue = false;
} else {
$group_venue = true;
}
}
// Organizer Details
if (tribe_has_organizer($event_id)) {
$html .= tribe_get_meta_group('tribe_event_organizer');
}
$html .= apply_filters('tribe_events_single_event_the_meta_addon', '', $event_id);
$html .= '</div>';
}
if (!$skeleton_mode && $group_venue) {
// If there's a venue map and custom fields or organizer, show venue details in this seperate section
$venue_details = tribe_get_meta_group('tribe_event_venue') . tribe_get_meta('tribe_venue_map');
if (!empty($venue_details)) {
$html .= apply_filters('tribe_events_single_event_the_meta_venue_row', sprintf('<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">%s</div>', $venue_details));
}
}
return apply_filters('tribe_events_single_event_meta', $html);
}
开发者ID:TMBR,项目名称:johnjohn,代码行数:55,代码来源:meta.php
示例5: tribe_display_meta
/**
* Simple diplay of meta tag
*
* @uses tribe_get_meta()
*
* @param string $meta_id
*
* @return echo tribe_get_meta( $meta_id )
*/
function tribe_display_meta($meta_id)
{
echo apply_filters('tribe_display_meta', tribe_get_meta($meta_id));
}
开发者ID:hubbardsc,项目名称:field_day,代码行数:13,代码来源:meta.php
示例6: tribe_events_single_event_meta
/**
* Return the single event meta
*
* @return string
* @since 3.0
* @author Jessica Yazbek
**/
function tribe_events_single_event_meta()
{
$event_id = get_the_ID();
$skeleton_mode = apply_filters('tribe_events_single_event_the_meta_skeleton', false, $event_id);
$group_venue = apply_filters('tribe_events_single_event_the_meta_group_venue', false, $event_id);
$html = '';
if ($skeleton_mode) {
// show all visible meta_groups in skeleton view
$html .= tribe_get_the_event_meta();
} else {
$html .= '<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">';
// Event Details
$html .= tribe_get_meta_group('tribe_event_details');
// When there is no map show the venue info up top
if (!$group_venue && !tribe_embed_google_map($event_id)) {
// Venue Details
$html .= tribe_get_meta_group('tribe_event_venue');
$group_venue = false;
} else {
if (!$group_venue && !tribe_has_organizer($event_id) && tribe_address_exists($event_id) && tribe_embed_google_map($event_id)) {
$html .= sprintf('%s<div class="tribe-events-meta-group">%s</div>', tribe_get_meta_group('tribe_event_venue'), tribe_get_meta('tribe_venue_map'));
$group_venue = false;
} else {
$group_venue = true;
}
}
// Organizer Details
if (tribe_has_organizer($event_id)) {
$html .= tribe_get_meta_group('tribe_event_organizer');
}
$html .= apply_filters('tribe_events_single_event_the_meta_addon', '', $event_id);
$html .= '</div>';
}
if (!$skeleton_mode && $group_venue) {
// If there's a venue map and custom fields or organizer, show venue details in this seperate section
$venue_details = tribe_get_meta_group('tribe_event_venue') . tribe_get_meta('tribe_venue_map');
if (!empty($venue_details)) {
$html .= apply_filters('tribe_events_single_event_the_meta_venue_row', sprintf('<div class="tribe-events-single-section tribe-events-event-meta tribe-clearfix">%s</div>', $venue_details));
}
}
return apply_filters('tribe_events_single_event_meta', $html);
}
开发者ID:TyRichards,项目名称:river_of_life,代码行数:49,代码来源:meta.php
示例7: while
while ($wp_query->have_posts()) {
$wp_query->the_post();
if (has_term('featured-event', 'tribe_events_cat')) {
$found = true;
?>
<p class="event-title"><?php
the_title();
?>
</p>
<p><?php
echo tribe_events_event_schedule_details();
?>
</p>
<p><?php
tribe_get_meta('tribe_event_venue_name');
?>
</p>
<p>New Member Orientation: 5:30 pm</p>
<p>Social: 6:30 pm</p>
<p>Meeting: 7:00 pm</p>
<?php
$content = the_content();
}
}
}
?>
</section>
<section class="image-section">
<?php
开发者ID:lizbur10,项目名称:js_finalproject,代码行数:31,代码来源:index.php
示例8: tribe_display_meta
/**
* Simple diplay of meta tag
*
* @uses tribe_get_meta()
* @deprecated 4.3
*
* @param string $meta_id
*
* @return echo tribe_get_meta( $meta_id )
*/
function tribe_display_meta($meta_id)
{
_deprecated_function(__FUNCTION__, '4.3');
echo apply_filters('tribe_display_meta', tribe_get_meta($meta_id));
}
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:15,代码来源:functions.php
注:本文中的tribe_get_meta函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论