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

PHP tribe_get_gridview_link函数代码示例

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

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



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

示例1: widget_output

 /**
  * The main widget output function (called by the class's widget() function).
  *
  * @param array $args
  * @param array $instance
  * @param string $template_name The template name.
  * @param string $subfolder The subfolder where the template can be found.
  * @param string $namespace The namespace for the widget template stuff.
  * @param string $pluginPath The pluginpath so we can locate the template stuff.
  */
 function widget_output($args, $instance, $template_name = 'list-widget', $subfolder = 'widgets', $namespace = '/', $pluginPath = '')
 {
     global $wp_query, $tribe_ecp, $post;
     extract($args, EXTR_SKIP);
     // The view expects all these $instance variables, which may not be set without pro
     $instance = wp_parse_args($instance, array('limit' => 5, 'title' => ''));
     extract($instance, EXTR_SKIP);
     // extracting $instance provides $title, $limit
     $title = apply_filters('widget_title', $title);
     if (!isset($category) || $category === '-1') {
         $category = 0;
     }
     if (tribe_get_option('viewOption') == 'upcoming') {
         $event_url = tribe_get_listview_link($category);
     } else {
         $event_url = tribe_get_gridview_link($category);
     }
     if (function_exists('tribe_get_events')) {
         $args = array('eventDisplay' => 'upcoming', 'posts_per_page' => $limit);
         if (!empty($category)) {
             $args['tax_query'] = array(array('taxonomy' => TribeEvents::TAXONOMY, 'terms' => $category, 'field' => 'ID', 'include_children' => false));
         }
         $posts = tribe_get_events($args);
     }
     // if no posts, and the don't show if no posts checked, let's bail
     if (!$posts && $no_upcoming_events) {
         return;
     }
     /* Before widget (defined by themes). */
     echo $before_widget;
     /* Title of widget (before and after defined by themes). */
     echo $title ? $before_title . $title . $after_title : '';
     if ($posts) {
         /* Display list of events. */
         echo '<ol class="hfeed vcalendar">';
         foreach ($posts as $post) {
             setup_postdata($post);
             include TribeEventsTemplates::getTemplateHierarchy('widgets/list-widget.php');
         }
         echo "</ol><!-- .hfeed -->";
         /* Display link to all events */
         echo '<p class="tribe-events-widget-link"><a href="' . $event_url . '" rel="bookmark">' . __('View All Events', 'tribe-events-calendar') . '</a></p>';
     } else {
         echo '<p>' . __('There are no upcoming events at this time.', 'tribe-events-calendar') . '</p>';
     }
     /* After widget (defined by themes). */
     echo $after_widget;
     wp_reset_query();
 }
开发者ID:paarthd,项目名称:gslvpa,代码行数:59,代码来源:widget-list.class.php


示例2: widget_output

 function widget_output($args, $instance, $template_name = 'events-list-load-widget-display')
 {
     global $wp_query, $tribe_ecp, $post;
     extract($args, EXTR_SKIP);
     extract($instance, EXTR_SKIP);
     // extracting $instance provides $title, $limit
     $title = apply_filters('widget_title', $title);
     if (!isset($category)) {
         $category = null;
     }
     if (tribe_get_option('viewOption') == 'upcoming') {
         $event_url = tribe_get_listview_link($category != -1 ? intval($category) : null);
     } else {
         $event_url = tribe_get_gridview_link($category != -1 ? intval($category) : null);
     }
     if (function_exists('tribe_get_events')) {
         $posts = tribe_get_events('eventDisplay=upcoming&posts_per_page=' . $limit . '&eventCat=' . $category);
         $template = TribeEventsTemplates::getTemplateHierarchy($template_name);
     }
     // if no posts, and the don't show if no posts checked, let's bail
     if (!$posts && $no_upcoming_events) {
         return;
     }
     /* Before widget (defined by themes). */
     echo $before_widget;
     /* Title of widget (before and after defined by themes). */
     echo $title ? $before_title . $title . $after_title : '';
     if ($posts) {
         /* Display list of events. */
         echo "<ul class='upcoming'>";
         foreach ($posts as $post) {
             setup_postdata($post);
             include $template;
         }
         echo "</ul>";
         /* Display link to all events */
         echo '<div class="dig-in"><a href="' . $event_url . '">' . __('View All Events', 'tribe-events-calendar') . '</a></div>';
     } else {
         _e('There are no upcoming events at this time.', 'tribe-events-calendar');
     }
     /* After widget (defined by themes). */
     echo $after_widget;
     wp_reset_query();
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:44,代码来源:widget-list.class.php


示例3: widget

 function widget($args, $instance)
 {
     global $wp_query, $post;
     $old_post = $post;
     extract($args, EXTR_SKIP);
     extract($instance, EXTR_SKIP);
     // extracting $instance provides $title, $limit, $no_upcoming_events, $start, $end, $venue, $address, $city, $state, $province'], $zip, $country, $phone , $cost
     $title = apply_filters('widget_title', $title);
     if (tribe_get_option('viewOption') == 'upcoming') {
         $event_url = tribe_get_listview_link();
     } else {
         $event_url = tribe_get_gridview_link();
     }
     if (function_exists('tribe_get_events')) {
         $posts = tribe_get_events('eventDisplay=upcoming&numResults=1&eventCat=' . $category);
         $template = TribeEventsTemplates::getTemplateHierarchy('widget-featured-display');
     }
     // if no posts, and the don't show if no posts checked, let's bail
     if (!$posts && isset($no_upcoming_events) && $no_upcoming_events) {
         return;
     }
     /* Before widget (defined by themes). */
     echo $before_widget;
     /* Title of widget (before and after defined by themes). */
     echo $title ? $before_title . $title . $after_title : '';
     if ($posts) {
         /* Display list of events. */
         foreach ($posts as $post) {
             setup_postdata($post);
             include $template;
         }
     } else {
         echo "<p>";
         _e('There are no upcoming events at this time.', 'tribe-events-calendar-pro');
         echo "</p>";
     }
     /* After widget (defined by themes). */
     echo $after_widget;
     $post = $old_post;
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:40,代码来源:widget-featured.class.php


示例4: setup_gridview_in_bar

 /**
  * Set up the calendar view in the view selector in the tribe events bar.
  *
  * @param array $views The current views array.
  *
  * @return array The modified views array.
  */
 public function setup_gridview_in_bar($views)
 {
     $views[] = array('displaying' => 'month', 'event_bar_hook' => 'tribe_events_month_before_template', 'anchor' => __('Month', 'the-events-calendar'), 'url' => tribe_get_gridview_link());
     return $views;
 }
开发者ID:kevinaxu,项目名称:99boulders,代码行数:12,代码来源:Main.php


示例5: tribe_events_the_header_attributes

 /**
  * Prints out data attributes used in the template header tags
  *
  * @category Events
  * @param string|null $current_view
  *
  * @return void
  * @todo move to template classes
  **/
 function tribe_events_the_header_attributes($current_view = null)
 {
     $attrs = array();
     $current_view = !empty($current_view) ? $current_view : basename(tribe_get_current_template());
     $attrs['data-title'] = wp_title('|', false, 'right');
     switch ($current_view) {
         case 'month.php':
             $attrs['data-view'] = 'month';
             $attrs['data-date'] = date('Y-m', strtotime(tribe_get_month_view_date()));
             $attrs['data-baseurl'] = tribe_get_gridview_link(false);
             break;
         case 'day.php':
             $attrs['data-startofweek'] = get_option('start_of_week');
             break;
         case 'list.php':
             $attrs['data-startofweek'] = get_option('start_of_week');
             $attrs['data-view'] = 'list';
             if (tribe_is_upcoming()) {
                 $attrs['data-baseurl'] = tribe_get_listview_link(false);
             } elseif (tribe_is_past()) {
                 $attrs['data-view'] = 'past';
                 $attrs['data-baseurl'] = tribe_get_listview_past_link(false);
             }
             break;
     }
     if (has_filter('tribe_events_mobile_breakpoint')) {
         $attrs['data-mobilebreak'] = tribe_get_mobile_breakpoint();
     }
     $attrs = apply_filters('tribe_events_header_attributes', $attrs, $current_view);
     foreach ($attrs as $attr => $value) {
         echo " {$attr}=" . '"' . esc_attr($value) . '"';
     }
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:42,代码来源:general.php


示例6: esc_url

echo esc_url(admin_url('images/wpspin_light.gif'));
?>
" class="ajax-loading" id="ajax-loading" alt="" style='display: none'/>
				</span>
			</span>

			<span class='tribe-events-calendar-buttons'> 
				<a class='tribe-events-button-off' href='<?php 
echo tribe_get_listview_link();
?>
'><?php 
_e('Event List', 'tribe-events-calendar');
?>
</a>
				<a class='tribe-events-button-on' href='<?php 
echo tribe_get_gridview_link();
?>
'><?php 
_e('Calendar', 'tribe-events-calendar');
?>
</a>
			</span>
		</div><!-- tribe-events-calendar-header -->
		<?php 
tribe_calendar_grid();
// See the views/table.php template for customization
?>
      <?php 
if (function_exists('tribe_get_ical_link')) {
    ?>
         <a title="<?php 
开发者ID:EfncoPlugins,项目名称:the-events-calendar,代码行数:31,代码来源:gridview.php


示例7: tribe_events_the_header_attributes

 /**
  * Prints out data attributes used in the template header tags
  *
  * @param string|null $current_view
  * @return void
  * @since 3.0
  **/
 function tribe_events_the_header_attributes($current_view = null)
 {
     $attrs = array();
     $current_view = !empty($current_view) ? $current_view : basename(tribe_get_current_template());
     $attrs['data-title'] = wp_title('&raquo;', false);
     switch ($current_view) {
         case 'month.php':
             $attrs['data-view'] = 'month';
             $attrs['data-date'] = date('Y-m', strtotime(tribe_get_month_view_date()));
             $attrs['data-baseurl'] = tribe_get_gridview_link(false);
             break;
         case 'list.php':
             $attrs['data-view'] = 'list';
             if (tribe_is_upcoming()) {
                 $attrs['data-baseurl'] = tribe_get_listview_link(false);
             } elseif (tribe_is_past()) {
                 $attrs['data-view'] = 'past';
                 $attrs['data-baseurl'] = tribe_get_listview_past_link(false);
             }
             break;
     }
     $attrs = apply_filters('tribe_events_header_attributes', $attrs, $current_view);
     foreach ($attrs as $attr => $value) {
         echo " {$attr}=" . '"' . $value . '"';
     }
 }
开发者ID:paarthd,项目名称:gslvpa,代码行数:33,代码来源:general.php


示例8: sp_get_gridview_link

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


示例9: axiom_tribe_events_get_period_links

 function axiom_tribe_events_get_period_links($links, $page, $delimiter = '')
 {
     if (!empty($links)) {
         return $links;
     }
     global $post;
     if ($page == 'tribe_day' && is_object($post)) {
         $links = '<a class="breadcrumbs_item cat_parent" href="' . tribe_get_gridview_link(false) . '">' . date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())) . '</a>';
     }
     return $links;
 }
开发者ID:pcuervo,项目名称:odc,代码行数:11,代码来源:plugin.tribe-events.php


示例10: showBreadcrumbs


//.........这里部分代码省略.........
                 if (in_array($type, array('single', 'attachment', 'woocommerce_product', 'tribe_event'))) {
                     if (!in_array($type, array('woocommerce_product', 'tribe_event')) && $args['show_all_filters']) {
                         $post_format = get_post_format($post_id);
                         if (($tpl_id = getTemplatePageId('only-' . $post_format)) > 0) {
                             $level++;
                             if ($level > $args['max_levels']) {
                                 $rez_level = '...';
                             } else {
                                 $rez_all .= (!empty($rez_all) ? $args['delimiter'] : '') . '<a class="all" href="' . get_permalink($tpl_id) . '">' . sprintf(__('All %s', 'themerex'), getPostFormatName($post_format, false)) . '</a>';
                             }
                         }
                     }
                     $cats = getCategoriesByPostId($post_id, $taxonomy);
                     $cat = $cats ? $cats[0] : false;
                     if ($cat) {
                         if (!in_array($cat['term_id'], $ex_cats)) {
                             $cat_link = get_term_link($cat['slug'], $cat['taxonomy']);
                             $level++;
                             if ($level > $args['max_levels']) {
                                 $rez_level = '...';
                             } else {
                                 $rez2 = '<a class="cat_post" href="' . $cat_link . '">' . getShortString($cat['name'], $args['truncate_title'], $args['truncate_add']) . '</a>' . (!empty($rez2) ? $args['delimiter'] : '') . $rez2;
                             }
                         }
                     } else {
                         $post_type = get_post_type($post_id);
                         $parentTax = 'category' . ($post_type == 'post' ? '' : '_' . $post_type);
                     }
                 } else {
                     if ($type == 'category') {
                         $cat = get_term_by('id', get_query_var('cat'), 'category', ARRAY_A);
                     } else {
                         if (themerex_strpos($type, 'woocommerce') !== false) {
                             if (is_product_category()) {
                                 $cat = get_term_by('slug', get_query_var('product_cat'), 'product_cat', ARRAY_A);
                             }
                         } else {
                             if (themerex_strpos($type, 'tribe') !== false) {
                                 if (tribe_is_event_category()) {
                                     $cat = get_term_by('slug', get_query_var('tribe_events_cat'), 'tribe_events_cat', ARRAY_A);
                                 }
                             }
                         }
                     }
                 }
                 if ($cat) {
                     $parent = $cat['parent'];
                     $parentTax = $cat['taxonomy'];
                 }
             }
             if ($parent) {
                 $cat = get_term_by('id', $parent, $parentTax, ARRAY_A);
                 if ($cat) {
                     if (!in_array($cat['term_id'], $ex_cats)) {
                         $cat_link = get_term_link($cat['slug'], $cat['taxonomy']);
                         $level++;
                         if ($level > $args['max_levels']) {
                             $rez_level = '...';
                         } else {
                             $rez2 = '<a class="cat_parent" href="' . $cat_link . '">' . getShortString($cat['name'], $args['truncate_title'], $args['truncate_add']) . '</a>' . (!empty($rez2) ? $args['delimiter'] : '') . $rez2;
                         }
                     }
                     $parent = $cat['parent'];
                 }
             }
         } while ($parent);
         if (themerex_strpos($type, 'woocommerce') !== false && ($shop_id = get_option('woocommerce_shop_page_id')) > 0 && !in_array(themerex_strtolower($title), array(themerex_strtolower($shop_title = getPostTitle($shop_id))))) {
             $rez_all = '<a class="all" href="' . get_permalink($shop_id) . '">' . $shop_title . '</a>' . (!empty($rez_all) ? $args['delimiter'] : '') . $rez_all;
         }
         if (themerex_strpos($type, 'tribe') !== false && !in_array(themerex_strtolower($title), array(__('All Events', 'themerex'), __('Tribe Events', 'themerex')))) {
             $rez_all = '<a class="all" href="' . tribe_get_events_link() . '">' . __('All Events', 'themerex') . '</a>' . (!empty($rez_all) ? $args['delimiter'] : '') . $rez_all;
         }
         if ($args['show_all_posts'] && !in_array(themerex_strtolower($title), array(themerex_strtolower(__('All Posts', 'themerex')))) && ($blog_id = getTemplatePageId('blog')) > 0) {
             $rez_all = '<a class="all" href="' . get_permalink($blog_id) . '">' . __('All Posts', 'themerex') . '</a>' . (!empty($rez_all) ? $args['delimiter'] : '') . $rez_all;
         }
         $rez3 = '';
         if ($type == 'tribe_day' && is_object($post)) {
             $rez3 .= (!empty($rez3) ? $args['delimiter'] : '') . '<a class="cat_parent" href="' . tribe_get_gridview_link(false) . '">' . date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())) . '</a>';
         } else {
             if (themerex_strpos($type, 'woocommerce') === false && is_archive() && is_object($post)) {
                 $year = get_the_time('Y');
                 $month = get_the_time('m');
                 if (is_day() || is_month()) {
                     $rez3 .= (!empty($rez3) ? $args['delimiter'] : '') . '<a class="cat_parent" href="' . get_year_link($year) . '">' . $year . '</a>';
                 }
                 if (is_day()) {
                     $rez3 .= (!empty($rez3) ? $args['delimiter'] : '') . '<a class="cat_parent" href="' . get_month_link($year, $month) . '">' . prepareDateForTranslation(get_the_date('F')) . '</a>';
                 }
             }
         }
         if (!is_front_page()) {
             // && !is_home()
             $rez .= (isset($args['home']) && $args['home'] != '' ? '<a class="home" href="' . ($args['home_url'] ? $args['home_url'] : home_url()) . '">' . $args['home'] . '</a>' . $args['delimiter'] : '') . (!empty($rez_all) ? $rez_all . $args['delimiter'] : '') . (!empty($rez_level) ? $rez_level . $args['delimiter'] : '') . (!empty($rez2) ? $rez2 . $args['delimiter'] : '') . (!empty($rez3) ? $rez3 . $args['delimiter'] : '') . ($title ? '<span class="current">' . $title . '</span>' : '');
         }
     }
     if ($args['echo'] && !empty($rez)) {
         echo balanceTags($rez);
     }
     return $rez;
 }
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:101,代码来源:_wp_utils.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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