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

PHP tribe_get_template_part函数代码示例

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

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



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

示例1: es_calendar

function es_calendar($atts)
{
    ob_start();
    ?>
    <div class="tribe-header-nav">
		    <?php 
    tribe_get_template_part('month/nav');
    ?>
    </div>
    <div class="events-archive events-gridview">
        <div id="tribe-events-content">
            <div id="home-calendar">
            </div>
        </div>
    </div>
<?php 
    $content = ob_get_contents();
    ob_clean();
    return $content;
}
开发者ID:gabriel-dehan,项目名称:erdf-sessions,代码行数:20,代码来源:shortcodes.php


示例2: get_map

 /**
  * Returns the placeholder HTML needed to embed a map within a page and
  * additionally enqueues supporting scripts, etc.
  *
  * @param int  $post_id ID of the pertinent event or venue
  * @param int  $width
  * @param int  $height
  * @param bool $force_load add the map even if no address data can be found
  *
  * @return string
  */
 public function get_map($post_id, $width, $height, $force_load)
 {
     $this->get_ids($post_id);
     // Bail if either the venue or event couldn't be determined
     if (!tribe_is_venue($this->venue_id) && !tribe_is_event($this->event_id)) {
         return apply_filters('tribe_get_embedded_map', '');
     }
     $this->form_address();
     if (empty($this->address) && !$force_load) {
         return apply_filters('tribe_get_embedded_map', '');
     }
     $this->embedded_maps[] = array('address' => $this->address, 'title' => esc_html(get_the_title($this->venue_id)));
     end($this->embedded_maps);
     $index = key($this->embedded_maps);
     // Generate the HTML used to "house" the map
     ob_start();
     tribe_get_template_part('modules/map', null, array('index' => $index, 'width' => null === $width ? apply_filters('tribe_events_single_map_default_width', '100%') : $width, 'height' => null === $height ? apply_filters('tribe_events_single_map_default_height', '350px') : $height));
     $this->setup_scripts();
     do_action('tribe_events_map_embedded', $index, $this->venue_id);
     return apply_filters('tribe_get_embedded_map', ob_get_clean());
 }
开发者ID:partisan-collective,项目名称:partisan,代码行数:32,代码来源:Embedded_Maps.php


示例3: tribe_show_month

 /**
  * Display a month
  * 
  * Inline example:
  * < code >
  * <?php
  * // output the events in May 2016 using the full month view template
  * tribe_show_month( array( 'eventDate' => '2016-05-01' ) )
  * ?>
  * </ code >
  *
  * @param array $args query args to pass to the month view
  * @param string $template_path template to use, defaults to the full month view
  * @return void
  * @author Jessica Yazbek
  * @since 3.0
  **/
 function tribe_show_month($args = array(), $template_path = 'month/content')
 {
     // temporarily unset the tribe bar params so they don't apply
     $hold_tribe_bar_args = array();
     foreach ($_REQUEST as $key => $value) {
         if ($value && strpos($key, 'tribe-bar-') === 0) {
             $hold_tribe_bar_args[$key] = $value;
             unset($_REQUEST[$key]);
         }
     }
     $month_class = new Tribe_Events_Month_Template($args);
     $month_class->setup_view();
     do_action('tribe_events_before_show_month');
     tribe_get_template_part($template_path);
     do_action('tribe_events_after_show_month');
     // reinstate the tribe bar params
     if (!empty($hold_tribe_bar_args)) {
         foreach ($hold_tribe_bar_args as $key => $value) {
             $_REQUEST[$key] = $value;
         }
     }
 }
开发者ID:donwea,项目名称:nhap.org,代码行数:39,代码来源:month.php


示例4: do_action

    do_action('tribe_events_after_loop');
    ?>
	<?php 
}
?>

	<!-- List Footer -->
	<?php 
do_action('tribe_events_before_footer');
?>
	<div id="tribe-events-footer">

		<!-- Footer Navigation -->
		<?php 
do_action('tribe_events_before_footer_nav');
?>
		<?php 
tribe_get_template_part('list/nav', 'footer');
?>
		<?php 
do_action('tribe_events_after_footer_nav');
?>

	</div>
	<!-- #tribe-events-footer -->
	<?php 
do_action('tribe_events_after_footer');
?>

</div><!-- #tribe-events-content -->
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:30,代码来源:content.php


示例5: while

			<?php 
        echo $day['daynum'];
        ?>
		<?php 
    }
    ?>

	</div>

	<!-- Events List -->
	<?php 
    while ($day['events']->have_posts()) {
        $day['events']->the_post();
        ?>
		<?php 
        tribe_get_template_part('month/single', 'event');
        ?>
	<?php 
    }
    ?>

	<!-- View More -->
	<?php 
    if ($day['view_more'] && tribe_events_is_view_enabled('day')) {
        ?>
		<div class="tribe-events-viewmore">
			<?php 
        $view_all_label = sprintf(_n('View 1 Event', 'View All %s Events', $day['total_events'], 'tribe-events-calendar'), $day['total_events']);
        ?>
			<a href="<?php 
        echo $day['view_more'];
开发者ID:Vinnica,项目名称:theboxerboston.com,代码行数:31,代码来源:single-day.php


示例6: the_ID

</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 
}
?>

		</div>
	</div>
	<!-- .tribe-events-day-time-slot -->
</div><!-- .tribe-events-loop -->
开发者ID:morganloehr,项目名称:chris-verna,代码行数:31,代码来源:loop.php


示例7: additional_fields

 /**
  * Render additional field data within the single event view meta section.
  */
 public function additional_fields()
 {
     tribe_get_template_part('pro/modules/meta/additional-fields', null, array('fields' => tribe_get_custom_fields()));
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:7,代码来源:Single_Event_Meta.php


示例8: do_calendar

 /**
  *
  * returns the full markup for the AJAX Calendar
  *
  * @static
  *
  * @param array $args
  *                            -----> eventDate:   date    What month-year to print
  *                            count:       int     # of events in the list (doesn't affect the calendar).
  *                            tax_query:   array   For the events list (doesn't affect the calendar).
  *                            Same format as WP_Query tax_queries. See sample below.
  *
  *
  * tax_query sample:
  *
  *        array( 'relation' => 'AND',
  *               array( 'taxonomy' => 'tribe_events_cat',
  *                      'field'    => 'slug',
  *                      'terms'    => array( 'featured' ),
  *              array( 'taxonomy' => 'post_tag',
  *                     'field'    => 'id',
  *                     'terms'    => array( 103, 115, 206 ),
  *                     'operator' => 'NOT IN' ) ) );
  *
  *
  */
 public function do_calendar($args = array())
 {
     $this->args = $args;
     // Disable tooltips
     $ecp = Tribe__Events__Pro__Main::instance();
     $tooltip_status = $ecp->recurring_info_tooltip_status();
     $ecp->disable_recurring_info_tooltip();
     if (!isset($this->args['eventDate'])) {
         $this->args['eventDate'] = $this->get_month();
     }
     // don't show the list if they set it the widget option to show 0 events in the list
     if ($this->args['count'] == 0) {
         $this->show_list = false;
     }
     // enqueue the widget js
     self::styles_and_scripts();
     // widget setting for count is not 0
     if (!$this->show_list) {
         add_filter('tribe_events_template_widgets/mini-calendar/list.php', '__return_false');
     }
     tribe_get_template_part('pro/widgets/mini-calendar-widget');
     if ($tooltip_status) {
         $ecp->enable_recurring_info_tooltip();
     }
 }
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:51,代码来源:Mini_Calendar.php


示例9: tribe_get_template_part

tribe_get_template_part('pro/widgets/this-week/nav', 'header', array('start_date' => $this_week_template_vars['start_date'], 'end_date' => $this_week_template_vars['end_date']));
?>

	<!-- This Week Grid -->
	<div class="tribe-this-week-widget-weekday-wrapper <?php 
echo esc_html('true' === $this_week_template_vars['hide_weekends'] ? 'tribe-this-week-widget-hide-weekends' : '');
?>
" >

		<?php 
foreach ($week_days as $day) {
    ?>

			<!-- This Week Day -->
			<?php 
    tribe_get_template_part('pro/widgets/this-week/loop-grid-day', 'grid-dau', array('day' => $day, 'this_week_template_vars' => $this_week_template_vars));
    ?>

		<?php 
}
?>

	</div>

</div>

<?php 
if ((isset($args['widget_id']) || isset($instance['widget_id'])) && (isset($instance['highlight_color']) && $instance['highlight_color'] != '')) {
    //Set Highlight Color for Widget or For Shortcode based on ID from Respective System
    $wrap_id = isset($args['widget_id']) ? $args['widget_id'] : '';
    if (is_numeric($wrap_id)) {
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:31,代码来源:this-week-widget.php


示例10: tribe_event_format_date

        ?>
"
					<?php 
        //Add Day Name Option for Responsive Header
        if ($daydata['total_events'] > 0) {
            $day_name = tribe_event_format_date($daydata['date'], false);
            ?>
						data-date-name="<?php 
            echo $day_name;
            ?>
"
					<?php 
        }
        ?>

				<?php 
    }
    ?>
				>
				<?php 
    tribe_get_template_part('month/single', 'day');
    ?>
			</td>
			<?php 
}
?>
		</tr>
		</tbody>
	</table><!-- .tribe-events-calendar -->
<?php 
do_action('tribe_events_after_the_grid');
开发者ID:Alexander-smirnov,项目名称:infomist,代码行数:31,代码来源:loop-grid.php


示例11: tribe_events_get_list_widget_view_all_link

// The URL for this widget's "View More" link.
$link_to_all = tribe_events_get_list_widget_view_all_link($instance);
// Check if any posts were found.
if (isset($posts) && $posts) {
    foreach ($posts as $post) {
        setup_postdata($post);
        do_action('tribe_events_widget_list_inside_before_loop');
        ?>

		<!-- Event  -->
		<div class="<?php 
        tribe_events_event_classes();
        ?>
">
			<?php 
        tribe_get_template_part('pro/widgets/modules/single-event', null, $instance);
        ?>
		</div><!-- .hentry .vevent -->

		<?php 
        do_action('tribe_events_widget_list_inside_after_loop');
        ?>

	<?php 
    }
    ?>

	<p class="tribe-events-widget-link">
		<a href="<?php 
    esc_attr_e(esc_url($link_to_all));
    ?>
开发者ID:agiper,项目名称:wordpress,代码行数:31,代码来源:list-widget.php


示例12: die

<?php

/**
 * Day View Template
 * The wrapper template for day view.
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/day.php
 *
 * @package TribeEventsCalendar
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
do_action('tribe_events_before_template');
?>

<!-- Tribe Bar -->
<?php 
tribe_get_template_part('modules/bar');
?>

<!-- Main Events Content -->
<?php 
tribe_get_template_part('day/content');
?>

<div class="tribe-clear"></div>

<?php 
do_action('tribe_events_after_template');
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:31,代码来源:day.php


示例13: while

		<div class="tribe-grid-content-wrap">
			<?php 
    while (tribe_events_week_have_days()) {
        tribe_events_week_the_day();
        tribe_events_week_reset_the_day_map();
        ?>
				<div title="<?php 
        tribe_events_week_get_the_date();
        ?>
" class="tribe-events-mobile-day column <?php 
        tribe_events_week_column_classes();
        ?>
">
					<?php 
        foreach (tribe_events_week_get_all_day_map() as $all_day_cols) {
            tribe_events_week_the_day_map();
            ?>
						<?php 
            tribe_get_template_part('pro/week/single-event', 'allday');
            ?>
					<?php 
        }
        ?>
				</div><!-- allday column -->
			<?php 
    }
    ?>
		</div><!-- .tribe-grid-content-wrap -->
	</div><!-- .tribe-grid-allday -->
<?php 
}
开发者ID:TMBR,项目名称:johnjohn,代码行数:31,代码来源:loop-grid-allday.php


示例14: die

 * @package TribeEventsCalendar
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
?>

<?php 
do_action('tribe_events_before_template');
?>

<!-- Google Map Container -->
<?php 
tribe_get_template_part('pro/map/gmap-container');
?>

<!-- Tribe Bar -->
<?php 
tribe_get_template_part('modules/bar');
?>

<!-- Main Events Content -->
<?php 
tribe_get_template_part('pro/map/content');
?>

<div class="tribe-clear"></div>

<?php 
do_action('tribe_events_after_template');
开发者ID:simple-beck,项目名称:project-gc,代码行数:31,代码来源:map.php


示例15: types_render_field

                    }
                }
            }
        }
    }
    ?>
</h1>
        <?php 
    if (is_single()) {
        $subtitle = types_render_field("subtitle", array("raw" => "true"));
        if (!empty($subtitle)) {
            echo "<h2 class='subtitle'>{$subtitle}</h2>";
        }
    }
    if (tribe_is_month() || tribe_is_list_view()) {
        tribe_get_template_part('modules/bar');
    }
    ?>
      </header>
    </div> <!-- end left block -->
    <?php 
}
?>
    <nav role="navigation" class="site-navigation">
      <div class="home-page-link"><a href="<?php 
echo esc_url(home_url('/'));
?>
" class="icon-home"><span>Home</span></a></div>
      <h1 class="assistive-text icon-menu"><span>Menu</span></h1>
      <div class="assistive-text skip-link"><a href="#content" title="Skip to content">Skip to content</a></div>
      <?php 
开发者ID:angelayunwu,项目名称:english-channel-wordpress-theme,代码行数:31,代码来源:header.php


示例16: fullAddress

 /**
  *  Returns the full address of an event along with HTML markup.  It
  *  loads the full-address template to generate the HTML
  */
 public function fullAddress($post_id = null, $includeVenueName = false)
 {
     global $post;
     if (!is_null($post_id)) {
         $tmp_post = $post;
         $post = get_post($post_id);
     }
     ob_start();
     tribe_get_template_part('modules/address');
     $address = ob_get_contents();
     ob_end_clean();
     if (!empty($tmp_post)) {
         $post = $tmp_post;
     }
     return $address;
 }
开发者ID:kevinaxu,项目名称:99boulders,代码行数:20,代码来源:Main.php


示例17: do_action

    ?>
		<?php 
    do_action('tribe_events_after_loop');
    ?>
	<?php 
}
?>

	<!-- List Footer -->
	<?php 
do_action('tribe_events_before_footer');
?>
	<div id="tribe-events-footer">

		<!-- Footer Navigation -->
		<?php 
do_action('tribe_events_before_footer_nav');
?>
		<?php 
tribe_get_template_part('pro/day/nav');
?>
		<?php 
do_action('tribe_events_after_footer_nav');
?>

	</div><!-- #tribe-events-footer -->
	<?php 
do_action('tribe_events_after_footer');
?>

</div><!-- #tribe-events-content -->
开发者ID:donwea,项目名称:nhap.org,代码行数:31,代码来源:content.php


示例18: while

while (tribe_events_have_month_days()) {
    tribe_events_the_month_day();
    ?>
			<?php 
    if ($week != tribe_events_get_current_week()) {
        $week++;
        ?>
		</tr>
		<tr>
			<?php 
    }
    ?>
			<td class="<?php 
    tribe_events_the_month_day_classes();
    ?>
">
				<?php 
    tribe_get_template_part('pro/widgets/mini-calendar/single-day');
    ?>
			</td>
			<?php 
}
?>
		</tr>
		</tbody>
		<?php 
do_action('tribe_events_mini_cal_after_the_grid');
?>
	</table>
</div> <!-- .tribe-mini-calendar-grid-wrapper -->
开发者ID:simple-beck,项目名称:project-gc,代码行数:30,代码来源:grid.php


示例19: do_action

    }
    ?>
			</a>
		</div>
	</div>
	<?php 
}
?>

	<div class="fusion-tribe-secondary-info">
		<!-- Event Meta -->
		<?php 
do_action('tribe_events_before_the_meta');
?>
		<?php 
tribe_get_template_part('list/meta');
?>
		<?php 
do_action('tribe_events_after_the_meta');
?>

		<!-- Event Content -->
		<?php 
do_action('tribe_events_before_the_content');
?>
		<div class="tribe-events-list-event-description tribe-events-content description entry-summary">
			<?php 
the_excerpt();
?>
			<a href="<?php 
echo esc_url(tribe_get_event_link());
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:31,代码来源:single-event.php


示例20: die

 * The wrapper template for a list of events. This includes the Past Events and Upcoming Events views
 * as well as those same views filtered to a specific category.
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/list.php
 *
 * @package TribeEventsCalendar
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
?>

<?php 
do_action('tribe_events_before_template');
?>

	<!-- Tribe Bar -->
<?php 
tribe_get_template_part('modules/bar');
?>

	<!-- Main Events Content -->
<?php 
tribe_get_template_part('list/content');
?>

	<div class="tribe-clear"></div>

<?php 
do_action('tribe_events_after_template');
开发者ID:lizbur10,项目名称:js_finalproject,代码行数:31,代码来源:list.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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