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

PHP tribe_events_event_classes函数代码示例

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

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



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

示例1: esc_attr

 *					console.log('Event title is: ' + obj.title);
 *
 *				});
 *
 *		});
 *
 *	})(window, document, jQuery);
 *
 */
?>

<div id="tribe-events-event-<?php 
echo esc_attr($event_id);
?>
" class="<?php 
tribe_events_event_classes();
?>
" data-tribejson='<?php 
echo esc_attr(tribe_events_template_data($post));
?>
'>
	<h3 class="tribe-events-month-event-title"><a href="<?php 
echo esc_url($link);
?>
" class="url"><?php 
echo $title;
?>
</a></h3>
</div><!-- #tribe-events-event-# -->

开发者ID:partisan-collective,项目名称:partisan,代码行数:29,代码来源:single-event.php


示例2: tribe_events_template_data

 /**
  * Returns json for javascript templating functions throughout the plugin.
  *
  * @category Events
  *
  * @param $event
  * @param $additional
  *
  * @return string
  */
 function tribe_events_template_data($event, array $additional = null)
 {
     $has_image = false;
     $image_src = '';
     $image_tool_src = '';
     $date_display = '';
     //Disable recurring event info in tooltip
     if (class_exists('Tribe__Events__Pro__Main')) {
         $ecp = Tribe__Events__Pro__Main::instance();
         $ecp->disable_recurring_info_tooltip();
         $date_display = strip_tags(tribe_events_event_schedule_details($event));
         // Re-enable recurring event info
         $ecp->enable_recurring_info_tooltip();
     } else {
         $date_display = strip_tags(tribe_events_event_schedule_details($event));
     }
     if (function_exists('has_post_thumbnail') && has_post_thumbnail($event->ID)) {
         $has_image = true;
         $image_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), 'medium');
         $image_src = $image_arr[0];
     }
     if ($has_image) {
         $image_tool_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), array(75, 75));
         $image_tool_src = $image_tool_arr[0];
     }
     if (has_excerpt($event->ID)) {
         $excerpt = $event->post_excerpt;
     } else {
         $excerpt = $event->post_content;
     }
     $excerpt = Tribe__Events__Main::instance()->truncate($excerpt, 30);
     $category_classes = tribe_events_event_classes($event->ID, false);
     $json = array('eventId' => $event->ID, 'title' => $event->post_title, 'permalink' => tribe_get_event_link($event->ID), 'imageSrc' => $image_src, 'dateDisplay' => $date_display, 'imageTooltipSrc' => $image_tool_src, 'excerpt' => $excerpt, 'categoryClasses' => $category_classes);
     /**
      * Template overrides (of month/tooltip.php) set up in 3.9.3 or earlier may still expect
      * these vars and will break without them, so they are being kept temporarily for
      * backwards compatibility purposes.
      *
      * @todo consider removing in 4.0
      */
     $json['startTime'] = tribe_get_start_date($event);
     $json['endTime'] = tribe_get_end_date($event);
     if ($additional) {
         $json = array_merge((array) $json, (array) $additional);
     }
     $json = apply_filters('tribe_events_template_data_array', $json, $event, $additional);
     $json = tribe_prepare_for_json_deep($json);
     return json_encode($json);
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:59,代码来源:general.php


示例3: trim

			<div class="col-xs-12">
				<h5><?php 
        echo trim($current_timeslot);
        ?>
</h5>
			</div>	
			<?php 
    }
    ?>

			<!-- event  -->
			<div id="post-<?php 
    the_ID();
    ?>
" class="<?php 
    tribe_events_event_classes($class);
    ?>
">
				<?php 
    tribe_get_template_part('day/single', 'event-2');
    ?>
			</div>
			<!-- .hentry .event -->

			<?php 
    do_action('tribe_events_inside_after_loop');
    ?>
		<?php 
}
?>
开发者ID:morganloehr,项目名称:chris-verna,代码行数:30,代码来源:loop.php


示例4: tribe_events_template_data

 /**
  * Returns json for javascript templating functions throughout the plugin.
  *
  * @category Events
  *
  * @param $event
  * @param $additional
  *
  * @return string
  */
 function tribe_events_template_data($event = null, array $additional = null)
 {
     // Base JSON variable
     $json = array('i18n' => array());
     if (!is_null($event)) {
         $event = get_post($event);
         // Check if we are dealing with an Event
         if (is_object($event) && $event instanceof WP_Post && tribe_is_event($event->ID)) {
             $has_image = false;
             $image_src = '';
             $image_tool_src = '';
             $date_display = '';
             //Disable recurring event info in tooltip
             if (class_exists('Tribe__Events__Pro__Main')) {
                 $ecp = Tribe__Events__Pro__Main::instance();
                 $ecp->disable_recurring_info_tooltip();
                 $date_display = strip_tags(tribe_events_event_schedule_details($event));
                 // Re-enable recurring event info
                 $ecp->enable_recurring_info_tooltip();
             } else {
                 $date_display = strip_tags(tribe_events_event_schedule_details($event));
             }
             if (function_exists('has_post_thumbnail') && has_post_thumbnail($event->ID)) {
                 $has_image = true;
                 $image_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), 'medium');
                 $image_src = $image_arr[0];
             }
             if ($has_image) {
                 $image_tool_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), array(75, 75));
                 $image_tool_src = $image_tool_arr[0];
             }
             if (has_excerpt($event->ID)) {
                 $excerpt = $event->post_excerpt;
             } else {
                 $excerpt = $event->post_content;
             }
             $excerpt = Tribe__Events__Main::instance()->truncate($excerpt, 30);
             $category_classes = tribe_events_event_classes($event->ID, false);
             $json['eventId'] = $event->ID;
             $json['title'] = $event->post_title;
             $json['permalink'] = tribe_get_event_link($event->ID);
             $json['imageSrc'] = $image_src;
             $json['dateDisplay'] = $date_display;
             $json['imageTooltipSrc'] = $image_tool_src;
             $json['excerpt'] = $excerpt;
             $json['categoryClasses'] = $category_classes;
             /**
              * Template overrides (of month/tooltip.php) set up in 3.9.3 or earlier may still expect
              * these vars and will break without them, so they are being kept temporarily for
              * backwards compatibility purposes.
              *
              * @todo consider removing in 4.0
              */
             $json['startTime'] = tribe_get_start_date($event);
             $json['endTime'] = tribe_get_end_date($event);
         }
     }
     /**
      * Internationalization Strings
      */
     $json['i18n']['find_out_more'] = esc_attr__('Find out more »', 'tribe-events-calendar');
     $json['i18n']['for_date'] = esc_attr(sprintf(__('%s for', 'tribe-events-calendar'), tribe_get_event_label_plural()));
     if ($additional) {
         $json = array_merge((array) $json, (array) $additional);
     }
     $json = apply_filters('tribe_events_template_data_array', $json, $event, $additional);
     $json = tribe_prepare_for_json_deep($json);
     return json_encode($json);
 }
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:79,代码来源:general.php


示例5: tribe_events_template_data

 /**
  * Returns json for javascript templating functions throughout the plugin.
  *
  * @param $event
  * @param $additional
  *
  * @return string
  */
 function tribe_events_template_data($event, array $additional = null)
 {
     $has_image = false;
     $start_time = '';
     $end_time = '';
     $image_src = '';
     $image_tool_src = '';
     // @TODO use tribe_events_event_schedule_details()
     $date_format = tribe_get_date_format(true);
     $time_format = get_option('time_format', TribeDateUtils::TIMEFORMAT);
     $date_time_separator = tribe_get_option('dateTimeSeparator', ' @ ');
     if (!empty($event->EventStartDate)) {
         $start_time .= date_i18n($date_format, strtotime($event->EventStartDate));
     }
     if (!tribe_get_event_meta($event->ID, '_EventAllDay', true)) {
         $start_time .= $date_time_separator . date_i18n($time_format, strtotime($event->EventStartDate));
     }
     if (!empty($event->EventEndDate) && $event->EventStartDate !== $event->EventEndDate) {
         if (date('Y-m-d', strtotime($event->EventStartDate)) == date('Y-m-d', strtotime($event->EventEndDate))) {
             if (!tribe_get_event_meta($event->ID, '_EventAllDay', true)) {
                 $end_time .= date_i18n($time_format, strtotime($event->EventEndDate));
             }
         } else {
             $end_time .= date_i18n($date_format, strtotime($event->EventEndDate));
             if (!tribe_get_event_meta($event->ID, '_EventAllDay', true)) {
                 $end_time .= $date_time_separator . date_i18n($time_format, strtotime($event->EventEndDate));
             }
         }
     }
     if (function_exists('has_post_thumbnail') && has_post_thumbnail($event->ID)) {
         $has_image = true;
         $image_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), 'medium');
         $image_src = $image_arr[0];
     }
     if ($has_image) {
         $image_tool_arr = wp_get_attachment_image_src(get_post_thumbnail_id($event->ID), array(75, 75));
         $image_tool_src = $image_tool_arr[0];
     }
     if (has_excerpt($event->ID)) {
         $excerpt = $event->post_excerpt;
     } else {
         $excerpt = $event->post_content;
     }
     $excerpt = TribeEvents::instance()->truncate($excerpt, 30);
     $category_classes = tribe_events_event_classes($event->ID, false);
     $json = array('eventId' => $event->ID, 'title' => $event->post_title, 'permalink' => tribe_get_event_link($event->ID), 'imageSrc' => $image_src, 'startTime' => $start_time, 'endTime' => $end_time, 'imageTooltipSrc' => $image_tool_src, 'excerpt' => $excerpt, 'categoryClasses' => $category_classes);
     if ($additional) {
         $json = array_merge((array) $json, (array) $additional);
     }
     $json = apply_filters('tribe_events_template_data_array', $json, $event, $additional);
     $json = tribe_prepare_for_json_deep($json);
     return json_encode($json);
 }
开发者ID:chicosilva,项目名称:olharambiental,代码行数:61,代码来源:general.php


示例6: 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>
开发者ID:simple-beck,项目名称:project-gc,代码行数:31,代码来源:_partial-single-event.php


示例7: die

if (!defined('ABSPATH')) {
    die('-1');
}
?>

<?php 
$event = tribe_events_week_get_event();
?>
<div id='tribe-events-event-<?php 
echo $event->ID;
?>
' <?php 
tribe_events_the_header_attributes('week-hourly');
?>
 class='<?php 
tribe_events_event_classes($event->ID);
?>
 tribe-week-event' data-tribejson='<?php 
echo tribe_events_template_data($event);
?>
'>
	<div class="hentry vevent">
		<h3 class="entry-title summary"><a href="<?php 
tribe_event_link($event);
?>
" class="url" rel="bookmark"><?php 
echo $event->post_title;
?>
</a></h3>
	</div>
</div>
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:single-event-hourly.php


示例8: esc_attr

 *		}
 *
 *	})(window, document);
 *
 * Same thing in jQuery:
 *
 *	(function (window, document, $) {
 *
 *		$(document).ready(function () {
 *
 *			$('.tribe_events')
 *				.each(function () {
 *
 *					var obj = $(this).data('tribejson');
 *
 *					console.log('Event title is: ' + obj.title);
 *
 *				});
 *
 *		});
 *
 *	})(window, document, jQuery);
 *
 */
?>

<div id="tribe-events-event-<?php echo esc_attr( $event_id ); ?>" class="<?php tribe_events_event_classes() ?>" data-tribejson='<?php echo esc_attr( tribe_events_template_data( $post ) ); ?>'>
	<h3 class="tribe-events-month-event-title entry-title summary"><a href="<?php echo esc_url( $link ) ?>" class="url fancybox fancybox.ajax"><?php echo $title ?></a></h3>
</div><!-- #tribe-events-event-# -->

开发者ID:simple-beck,项目名称:project-gc,代码行数:29,代码来源:single-event.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP tribe_events_event_schedule_details函数代码示例发布时间:2022-05-23
下一篇:
PHP tribe_events_earliest_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