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

PHP tribe_events_get_the_excerpt函数代码示例

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

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



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

示例1: get_data

 /**
  * Compile the schema.org event data into an array
  */
 public function get_data($post = null, $args = array())
 {
     if (!$post instanceof WP_Post) {
         $post = Tribe__Main::post_id_helper($post);
     }
     $post = get_post($post);
     if (!$post instanceof WP_Post) {
         return array();
     }
     $data = (object) array();
     // We may need to prevent the context to be triggered
     if (!isset($args['context']) || false !== $args['context']) {
         $data->{'@context'} = 'http://schema.org';
     }
     $data->{'@type'} = $this->type;
     $data->name = esc_js(get_the_title($post));
     $data->description = esc_js(tribe_events_get_the_excerpt($post));
     if (has_post_thumbnail($post)) {
         $data->image = wp_get_attachment_url(get_post_thumbnail_id($post));
     }
     $data->url = esc_url_raw(get_permalink($post));
     // Index by ID: this will allow filter code to identify the actual event being referred to
     // without injecting an additional property
     return array($post->ID => $data);
 }
开发者ID:nullify005,项目名称:shcc-website,代码行数:28,代码来源:Abstract.php


示例2: build_data

 /**
  * Compile the schema.org event data into an array
  */
 protected function build_data()
 {
     global $post;
     $id = $post->ID;
     $data = array();
     // Index by ID: this will allow filter code to identify the actual event being referred to
     // without injecting an additional property
     $data[$id] = new stdClass();
     $data[$id]->{'@context'} = 'http://schema.org';
     $data[$id]->{'@type'} = 'Thing';
     $data[$id]->name = get_the_title();
     $data[$id]->description = tribe_events_get_the_excerpt($post);
     if (has_post_thumbnail()) {
         $data[$id]->image = wp_get_attachment_url(get_post_thumbnail_id($id));
     }
     $data[$id]->url = get_permalink($id);
     return $data;
 }
开发者ID:lizbur10,项目名称:js_finalproject,代码行数:21,代码来源:Google_Data_Markup.php


示例3: implode

				<?php 
    echo implode(', ', $venue_details);
    ?>
			</div> <!-- .tribe-events-venue-details -->
		<?php 
}
?>

	</div>
</div><!-- .tribe-events-event-meta -->
<?php 
do_action('tribe_events_after_the_meta');
?>

<!-- Event Image -->
<?php 
echo tribe_event_featured_image(null, 'medium');
?>

<!-- Event Content -->
<?php 
do_action('tribe_events_before_the_content');
?>
<div class="tribe-events-list-event-description tribe-events-content">
	<?php 
echo tribe_events_get_the_excerpt();
?>

</div><!-- .tribe-events-list-event-description -->
<?php 
do_action('tribe_events_after_the_content');
开发者ID:AC85,项目名称:musikschule-wp-theme,代码行数:31,代码来源:single-event.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];
             }
             $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'] = tribe_events_get_the_excerpt($event);
             $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 »', 'the-events-calendar');
     $json['i18n']['for_date'] = sprintf(esc_attr__('%s for', 'the-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:reubenbrown13,项目名称:the-events-calendar,代码行数:73,代码来源:general.php


示例5: die

<?php

/**
 * Embed Content Template
 *
 * The content template for the embed view.
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/embed/content.php
 *
 * @version 4.2
 *
 * @package TribeEventsCalendar
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
?>
<div class="tribe-events-single-event-description tribe-events-content">
	<?php 
echo tribe_events_get_the_excerpt(null, wp_kses_allowed_html('post'));
?>
</div>
<?php 
/**
 * Print additional content after the embed excerpt.
 *
 * @since 4.4.0
 */
do_action('embed_content');
开发者ID:nullify005,项目名称:shcc-website,代码行数:30,代码来源:content.php


示例6: tribe_upcoming_events

function tribe_upcoming_events($atts)
{
    // Attributes
    extract(shortcode_atts(array('number' => 3, 'usecols' => true, 'cols' => 3), $atts));
    // Code
    add_filter('excerpt_length', 'tekserve_studio_excerpt_length', 999);
    $html = '<div id="tribe-events-content" class="tekserve-studio-tribe-events tribe-events-list tribe-events-photo">
		<div class="tribe-events-loop hfeed vcalendar tribe-clearfix" id="tribe-events-photo-events">';
    $args = array('post_type' => 'tribe_events', 'post_status' => 'publish', 'posts_per_page' => $number);
    $the_query = new WP_Query($args);
    // The Loop
    if ($the_query->have_posts()) {
        if ($usecols) {
            if (intval($cols) > 12) {
                $cols = intval($cols / 12);
            }
            //end if( intval( $cols ) > 12 )
            $colsize = intval(12 / $cols);
            $coltag = '[column size="' . $colsize . '" col_class="md"]';
            $i = 0;
            while ($the_query->have_posts()) {
                $post = $the_query->the_post();
                if ($i == 0) {
                    $html .= '[row]';
                }
                //end if( $i == 0 )
                $html .= $coltag;
                $html .= '<div class="tribe-events-photo-event-wrap">';
                $html .= tribe_event_featured_image(null, 'medium');
                $html .= '<div class="tribe-events-event-details tribe-clearfix">';
                $html .= print_r(do_action('tribe_events_before_the_event_title'), true);
                $html .= '<h3 class="tribe-events-list-event-title entry-title summary">';
                $html .= '<a class="url" href="' . esc_url(tribe_get_event_link()) . '" title="' . the_title('', '', false) . '" rel="bookmark">';
                $html .= the_title('', '', false);
                $html .= '</a></h3>';
                $html .= print_r(do_action('tribe_events_after_the_event_title'), true);
                $html .= print_r(do_action('tribe_events_before_the_meta'), true);
                $html .= '<div class="tribe-events-event-meta">
								<div class="updated published time-details">';
                if (!empty($post->distance)) {
                    $html .= '<strong>[' . tribe_get_distance_with_unit($post->distance) . ']</strong>';
                }
                //end if( ! empty( $post->distance ) )
                $html .= tribe_events_event_schedule_details();
                $html .= '</div>
					</div>';
                $html .= print_r(do_action('tribe_events_after_the_meta'), true);
                $html .= print_r(do_action('tribe_events_before_the_content'), true);
                $html .= '<div class="tribe-events-list-photo-description tribe-events-content entry-summary description">';
                $html .= tribe_events_get_the_excerpt();
                $html .= '</div>';
                $html .= print_r(do_action('tribe_events_after_the_content'), true);
                $html .= '	</div>
				</div>';
                $html .= '[/column]';
                if ($i == intval($cols - 1)) {
                    $html .= '[/row]';
                }
                //end if( $i == intval( $cols-1 ) )
                if ($i < $cols) {
                    $i++;
                } else {
                    $i = 0;
                }
                //end if( $i < $cols )
            }
            //end while( $the_query->have_posts() )
        } else {
            while ($the_query->have_posts()) {
                $post = $the_query->the_post();
                $html .= '<div class="tribe-events-photo-event-wrap">';
                $html .= tribe_event_featured_image(null, 'medium');
                $html .= '<div class="tribe-events-event-details tribe-clearfix">';
                $html .= print_r(do_action('tribe_events_before_the_event_title'), true);
                $html .= '<h3 class="tribe-events-list-event-title entry-title summary">';
                $html .= '<a class="url" href="' . esc_url(tribe_get_event_link()) . '" title="' . the_title('', '', false) . '" rel="bookmark">';
                $html .= the_title('', '', false);
                $html .= '</a></h3>';
                $html .= print_r(do_action('tribe_events_after_the_event_title'), true);
                $html .= print_r(do_action('tribe_events_before_the_meta'), true);
                $html .= '<div class="tribe-events-event-meta">
								<div class="updated published time-details">';
                if (!empty($post->distance)) {
                    $html .= '<strong>[' . tribe_get_distance_with_unit($post->distance) . ']</strong>';
                }
                //end if( ! empty( $post->distance ) )
                $html .= tribe_events_event_schedule_details();
                $html .= '</div>
					</div>';
                $html .= print_r(do_action('tribe_events_after_the_meta'), true);
                $html .= print_r(do_action('tribe_events_before_the_content'), true);
                $html .= '<div class="tribe-events-list-photo-description tribe-events-content entry-summary description">';
                $html .= tribe_events_get_the_excerpt();
                $html .= '</div>';
                $html .= print_r(do_action('tribe_events_after_the_content'), true);
                $html .= '	</div>
				</div>';
            }
            //end while( $the_query->have_posts() )
        }
//.........这里部分代码省略.........
开发者ID:hkbrown21,项目名称:carya-tekserve-studio-child-theme,代码行数:101,代码来源:functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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