当前位置: 首页>>代码示例>>PHP>>正文


PHP tribe_get_events_link函数代码示例

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


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

示例1: handle

 public function handle()
 {
     $deps = array_merge($this->deps, array('jquery'), Tribe__Events__Template_Factory::get_vendor_scripts());
     $path = Tribe__Events__Template_Factory::getMinFile(tribe_events_resource_url('tribe-events.js'), true);
     $handle = $this->prefix . '-calendar-script';
     wp_enqueue_script($handle, $path, $deps, $this->filter_js_version());
     $js_config_array = array('permalink_settings' => get_option('permalink_structure'), 'events_post_type' => Tribe__Events__Main::POSTTYPE, 'events_base' => tribe_get_events_link());
     wp_localize_script($handle, 'tribe_js_config', $js_config_array);
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:9,代码来源:Calendar_Script.php

示例2: print_all_events_link

    public static function print_all_events_link()
    {
        if (tribe_is_recurring_event()) {
            ?>
			<p class="tribe-events-back tribe-events-loop">
				<a href="<?php 
            echo esc_url(tribe_get_events_link());
            ?>
"> <?php 
            printf('&laquo; ' . esc_html__('All %s', 'the-events-calendar'), tribe_get_event_label_plural());
            ?>
</a>
			</p>
			<?php 
        }
    }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:16,代码来源:List_View.php

示例3: ckhp_get_tribe_list

function ckhp_get_tribe_list($atts)
{
    if (!function_exists('tribe_get_events')) {
        return;
    }
    global $wp_query, $tribe_ecp, $post;
    $output = '';
    $ckhp_event_tax = '';
    extract(shortcode_atts(array('cat' => '', 'number' => 5, 'class' => '', 'error' => 'y'), $atts, 'ckhp-tribe-events'), EXTR_PREFIX_ALL, 'ckhp');
    $class = $atts['class'];
    if ($ckhp_cat) {
        $ckhp_event_tax = array(array('taxonomy' => 'tribe_events_cat', 'field' => 'slug', 'terms' => $ckhp_cat));
    }
    $posts = tribe_get_events(apply_filters('tribe_events_list_widget_query_args', array('eventDisplay' => 'upcoming', 'posts_per_page' => $ckhp_number, 'tax_query' => $ckhp_event_tax)));
    if (!isset($no_upcoming_events)) {
        $no_upcoming_events = 0;
    }
    if ($posts && !$no_upcoming_events) {
        if ($posts && !$no_upcoming_events) {
            $output .= '<div class="event-calendar ' . $class . '">';
            foreach ($posts as $post) {
                setup_postdata($post);
                $output .= '<a href="' . tribe_get_event_link() . '" rel="bookmark">';
                $output .= '<div class="event-post">';
                $output .= '<div class="event-date">';
                $output .= '<time>' . sp_get_start_date($postId = null, $showtime = true, $dateFormat = 'M') . '<span>' . sp_get_start_date($postId = null, $showtime = true, $dateFormat = 'd') . '</span></time>';
                $output .= '</div>';
                $output .= '<div class="event-details">';
                $output .= '<p>' . sp_get_start_date($postId = null, $showtime = true, $dateFormat = 'l') . ' ' . sp_get_start_date($postId = null, $showtime = true, $dateFormat = 'g:i a') . '</p>';
                $output .= '<h4 class="media-heading">' . '<a href="' . tribe_get_event_link() . '" rel="bookmark">' . get_the_title() . '</a>' . '</h4>';
                $output .= '</div>';
                $output .= '</div>';
                $output .= '</a>';
            }
            $output .= '</div><!-- .hfeed -->';
            $output .= '<p class="tribe-events-widget-link"><a class="btn btn-primary btn-sm" href="' . tribe_get_events_link() . '" rel="bookmark">' . translate('View All Events', 'tribe-events-calendar') . '</a></p>';
        }
    } else {
        //No Events were Found
        $output .= $ckhp_error == 'y' ? '<p>' . translate('There are no upcoming events at this time.', 'tribe-events-calendar') . '</p>' : '';
    }
    // endif
    wp_reset_query();
    return $output;
}
开发者ID:breonwilliams,项目名称:boot-plus,代码行数:45,代码来源:recent-events.php

示例4: themefusion_breadcrumb

 function themefusion_breadcrumb()
 {
     global $smof_data, $post;
     echo '<ul class="breadcrumbs">';
     if (!is_front_page()) {
         echo '<li>' . $smof_data['breacrumb_prefix'] . ' <a href="';
         echo home_url();
         echo '">' . __('Početna', 'Avada');
         echo "</a></li>";
     }
     $params['link_none'] = '';
     $separator = '';
     if (is_category() && !is_singular('avada_portfolio')) {
         $category = get_the_category();
         $ID = $category[0]->cat_ID;
         echo is_wp_error($cat_parents = get_category_parents($ID, TRUE, '', FALSE)) ? '' : '<li>' . $cat_parents . '</li>';
     }
     if (is_singular('avada_portfolio')) {
         echo get_the_term_list($post->ID, 'portfolio_category', '<li>', '&nbsp;/&nbsp;&nbsp;', '</li>');
         echo '<li>' . get_the_title() . '</li>';
     }
     if (is_singular('event')) {
         $terms = get_the_term_list($post->ID, 'event-categories', '<li>', '&nbsp;/&nbsp;&nbsp;', '</li>');
         if (!is_wp_error($terms)) {
             echo get_the_term_list($post->ID, 'event-categories', '<li>', '&nbsp;/&nbsp;&nbsp;', '</li>');
         }
         echo '<li>' . get_the_title() . '</li>';
     }
     if (is_tax()) {
         $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
         echo '<li>' . $term->name . '</li>';
     }
     if (is_home()) {
         echo '<li>' . $smof_data['blog_title'] . '</li>';
     }
     if (is_page() && !is_front_page()) {
         $parents = array();
         $parent_id = $post->post_parent;
         while ($parent_id) {
             $page = get_page($parent_id);
             if ($params["link_none"]) {
                 $parents[] = get_the_title($page->ID);
             } else {
                 $parents[] = '<li><a href="' . get_permalink($page->ID) . '" title="' . get_the_title($page->ID) . '">' . get_the_title($page->ID) . '</a></li>' . $separator;
             }
             $parent_id = $page->post_parent;
         }
         $parents = array_reverse($parents);
         echo join('', $parents);
         echo '<li>' . get_the_title() . '</li>';
     }
     if (is_single() && !is_singular('avada_portfolio') && !is_singular('tribe_events') && !is_singular('event') && !is_singular('wpfc_sermon')) {
         $categories_1 = get_the_category($post->ID);
         if ($categories_1) {
             foreach ($categories_1 as $cat_1) {
                 $cat_1_ids[] = $cat_1->term_id;
             }
             $cat_1_line = implode(',', $cat_1_ids);
         }
         if ($cat_1_line) {
             $categories = get_categories(array('include' => $cat_1_line, 'orderby' => 'id'));
             if ($categories) {
                 foreach ($categories as $cat) {
                     $cats[] = '<li><a href="' . get_category_link($cat->term_id) . '" title="' . $cat->name . '">' . $cat->name . '</a></li>';
                 }
                 echo join('', $cats);
             }
         }
         echo '<li>' . get_the_title() . '</li>';
     }
     if (is_tag()) {
         echo '<li>' . "Tag: " . single_tag_title('', FALSE) . '</li>';
     }
     if (is_search()) {
         echo '<li>' . __("Pretraži", 'Avada') . '</li>';
     }
     if (is_year()) {
         echo '<li>' . get_the_time('Y') . '</li>';
     }
     if (is_404()) {
         if (class_exists('TribeEvents') && tribe_is_event() || is_events_archive()) {
             echo '<li>' . tribe_get_events_title() . '</li>';
         } else {
             echo '<li>' . __("404 - Stranica nije pronađena", 'Avada') . '</li>';
         }
     }
     if (class_exists('TribeEvents') && tribe_is_event() && !is_404()) {
         if (is_singular('tribe_events')) {
             echo sprintf('<li><a href="%s" title="%s">%s</a></li>', tribe_get_events_link(), tribe_get_events_title(), tribe_get_events_title());
             echo '<li>' . get_the_title() . '</li>';
         } else {
             echo '<li>' . tribe_get_events_title() . '</li>';
         }
     }
     echo "</ul>";
 }
开发者ID:ftopolovec,项目名称:proart,代码行数:96,代码来源:custom_functions.php

示例5: reset_page_title

 /**
  * Sets the page title for the various PRO views.
  *
  * @param string $title The current title.
  *
  * @return string The modified title.
  */
 public function reset_page_title($title, $depth = true)
 {
     global $wp_query;
     $tec = Tribe__Events__Main::instance();
     $date_format = apply_filters('tribe_events_pro_page_title_date_format', tribe_get_date_format(true));
     if (tribe_is_showing_all()) {
         $reset_title = sprintf(__('All %1$s for %2$s', 'tribe-events-calendar-pro'), strtolower($this->plural_event_label), get_the_title());
     }
     // week view title
     if (tribe_is_week()) {
         $reset_title = sprintf(__('%1$s for week of %2$s', 'tribe-events-calendar-pro'), $this->plural_event_label, date_i18n($date_format, strtotime(tribe_get_first_week_day($wp_query->get('start_date')))));
     }
     if (!empty($reset_title) && is_tax($tec->get_event_taxonomy()) && $depth) {
         $cat = get_queried_object();
         $reset_title = '<a href="' . tribe_get_events_link() . '">' . $reset_title . '</a>';
         $reset_title .= ' &#8250; ' . $cat->name;
     }
     return isset($reset_title) ? $reset_title : $title;
 }
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:26,代码来源:Main.php

示例6: tribe_get_event_label_singular

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

$events_label_singular = tribe_get_event_label_singular();
$events_label_plural = tribe_get_event_label_plural();

$event_id = get_the_ID();

?>

<div id="tribe-events-content" class="tribe-events-single vevent hentry">

	<p class="tribe-events-back">
		<a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> <?php printf( __( '&laquo; All %s', 'tribe-events-calendar' ), $events_label_plural ); ?></a>
	</p>

	<!-- Notices -->
	<?php tribe_events_the_notices() ?>

	<?php the_title( '<h2 class="tribe-events-single-event-title summary entry-title">', '</h2>' ); ?>

	<div class="tribe-events-schedule updated published tribe-clearfix">
		<?php echo tribe_events_event_schedule_details( $event_id, '<h3>', '</h3>' ); ?>
		<?php if ( tribe_get_cost() ) : ?>
			<span class="tribe-events-divider">|</span>
			<span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
		<?php endif; ?>
	</div>
开发者ID:simple-beck,项目名称:project-gc,代码行数:29,代码来源:single-event.php

示例7: tribe_display_current_events_slug

/**
 * display the events slug description
 *
 * @return string, the string to display
 */
function tribe_display_current_events_slug()
{
    echo '<p class="tribe-field-indent tribe-field-description description">' . __('The slug used for building the events URL.', 'tribe-events-calendar') . sprintf(__('Your current Events URL is %s', 'tribe-events-calendar'), '<code><a href="' . tribe_get_events_link() . '">' . tribe_get_events_link() . '</a></code>') . '</p>';
}
开发者ID:estrategasdigitales,项目名称:Golone,代码行数:9,代码来源:options.php

示例8: wpex_breadcrumbs


//.........这里部分代码省略.........
							</span>';
                    }
                }
            }
            // Standard Posts
            if ('post' == $post_type) {
                // Main Blog URL
                if ($blog_page = get_theme_mod('blog_page')) {
                    $blog_url = get_permalink($blog_page);
                    $blog_name = get_the_title($blog_page);
                    if (function_exists('icl_object_id')) {
                        $blog_name = get_the_title(icl_object_id($blog_page, 'page'));
                    }
                    $trail[] = '<span ' . $item_type_scope . ' class="trail-blog-url">
									<a href="' . $blog_url . '" title="' . $blog_name . '" itemprop="url">
										<span itemprop="title">' . $blog_name . '</span>
									</a>
								</span>';
                }
                // 1st Category
                if (get_theme_mod('breadcrumbs_blog_cat', '1')) {
                    $terms = get_the_terms($post_id, 'category');
                    if ($terms) {
                        $term = reset($terms);
                        $trail[] = '<span ' . $item_type_scope . ' class="trail-blog-cat">
										<a href="' . get_term_link($term) . '" itemprop="url" title="' . $term->name . '">
											<span itemprop="title">' . $term->name . '</span>
										</a>
									</span>';
                    }
                }
            }
            // Tribe Events
            if ('tribe_events' == $post_type && function_exists('tribe_get_events_link')) {
                $trail[] = '<span ' . $item_type_scope . ' class="trail-portfolio-url">
								<a href="' . tribe_get_events_link() . '" title="' . __('All Events', 'wpex') . '">
									<span itemprop="title">' . __('All Events', 'wpex') . '</span>
								</a>
							</span>';
            }
            //  Main Portfolio
            if ($post_type == 'portfolio') {
                if ($portfolio_page = get_theme_mod('portfolio_page')) {
                    $portfolio_url = get_permalink($portfolio_page);
                    $portfolio_name = get_the_title($portfolio_page);
                    if (function_exists('icl_object_id')) {
                        $portfolio_name = get_the_title(icl_object_id($portfolio_page, 'page'));
                    }
                    if ($portfolio_url) {
                        $trail[] = '<span ' . $item_type_scope . ' class="trail-portfolio-url">
									<a href="' . $portfolio_url . '" title="' . $portfolio_name . '">
										<span itemprop="title">' . $portfolio_name . '</span>
									</a>
								</span>';
                    }
                }
                // Portfolio 1st Category
                if (get_theme_mod('breadcrumbs_portfolio_cat', '1') && taxonomy_exists('portfolio_category')) {
                    $terms = get_the_terms($post_id, 'portfolio_category');
                    if ($terms) {
                        $term = reset($terms);
                        $trail[] = '<span ' . $item_type_scope . ' class="trail-portfolio-cat">
										<a href="' . get_term_link($term) . '" itemprop="url" title="' . $term->name . '">
											<span itemprop="title">' . $term->name . '</span>
										</a>
									</span>';
开发者ID:sergey-h,项目名称:naman,代码行数:67,代码来源:breadcrumbs.php

示例9: sp_get_events_link

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

示例10: generate_crumbs

 private function generate_crumbs()
 {
     // Globals
     global $wp_query, $wp_rewrite;
     // Get post id
     $post_id = $this->post_id;
     // Define main variables
     $breadcrumb = $path = '';
     $trail = array();
     $item_type_scope = $this->itemscope;
     // Home text
     $home_text = wpex_get_translated_theme_mod('breadcrumbs_home_title');
     $home_text = $home_text ? $home_text : '<span class="fa fa-home"></span><span class="display-none">' . esc_html_x('Home', 'breadcrumbs', 'total') . '</span>';
     // Default arguments
     $args = apply_filters('wpex_breadcrumbs_args', array('home_text' => $home_text, 'home_link' => home_url('/'), 'separator' => wpex_element('angle_right'), 'front_page' => false, 'show_posts_page' => true));
     // Extract args for easy variable naming.
     extract($args);
     /*-----------------------------------------------------------------------------------*/
     /*  - Homepage link
     			/*-----------------------------------------------------------------------------------*/
     $trail['trail_start'] = '<span ' . esc_attr($item_type_scope) . '><a href="' . esc_url($home_link) . '" title="' . esc_attr(get_bloginfo('name')) . '" rel="home" class="trail-begin" itemprop="url"><span itemprop="title">' . $home_text . '</span></a></span>';
     /*-----------------------------------------------------------------------------------*/
     /*  - Front Page
     			/*-----------------------------------------------------------------------------------*/
     if (is_front_page()) {
         if (!$front_page) {
             $trail = false;
         } elseif ($show_home) {
             $trail['trail_end'] = "{$show_home}";
         }
     } elseif (is_home()) {
         $home_page = get_page($wp_query->get_queried_object_id());
         if (is_object($home_page)) {
             $trail = array_merge($trail, $this->get_post_parents($home_page->post_parent, ''));
             $trail['trail_end'] = '<span itemprop="title">' . get_the_title($home_page->ID) . '</span>';
         }
     } elseif (is_singular()) {
         // Get singular vars
         $post = $wp_query->get_queried_object();
         $post_id = absint($wp_query->get_queried_object_id());
         $post_type = $post->post_type;
         $parent = $post->post_parent;
         // Pages
         if ('page' == $post_type) {
             // Woo pages
             if (WPEX_WOOCOMMERCE_ACTIVE) {
                 // Add shop page to cart
                 if (is_cart() || is_checkout()) {
                     // Get shop data
                     $shop_data = $this->get_shop_data();
                     $shop_url = $shop_data['url'];
                     $shop_title = $shop_data['title'];
                     // Add shop link
                     if ($shop_url && $shop_title) {
                         $trail['shop'] = '<span ' . esc_attr($item_type_scope) . ' class="trail-shop"><a href="' . esc_url($shop_url) . '" title="' . esc_attr($shop_title) . '" itemprop="url"><span itemprop="title">' . esc_html($shop_title) . '</span></a></span>';
                     }
                 }
                 // Add cart to checkout
                 if (is_checkout()) {
                     $cart_id = wpex_parse_obj_id(wc_get_page_id('cart'), 'page');
                     if ($cart_id) {
                         $cart_title = get_the_title($cart_id);
                         $trail['cart'] = '<span ' . esc_attr($item_type_scope) . ' class="trail-type-archive trail-cart"><a href="' . esc_url(get_permalink($cart_id)) . '" title="' . esc_attr($cart_title) . '" itemprop="url"><span itemprop="title">' . $cart_title . '</span></a></span>';
                     }
                 }
             }
         } elseif ('post' == $post_type) {
             // Main Blog URL
             $page_id = wpex_parse_obj_id(wpex_get_mod('blog_page'), 'page');
             if ($page_id) {
                 $page_permalink = get_permalink($page_id);
                 $page_name = get_the_title($page_id);
                 if ($page_permalink && $page_name) {
                     $trail['blog'] = '<span ' . esc_attr($item_type_scope) . ' class="trail-blog-url"> <a href="' . esc_url($page_permalink) . '" title="' . esc_attr($page_name) . '" itemprop="url"><span itemprop="title">' . $page_name . '</span></a></span>';
                 }
             }
             // Categories
             if ($terms = $this->get_post_terms($taxonomy = 'category')) {
                 $trail['categories'] = '<span class="trail-post-categories">' . $terms . '</span>';
             }
         } elseif ('tribe_events' == $post_type) {
             if (function_exists('tribe_get_events_link')) {
                 $trail['tribe_events'] = '<span ' . esc_attr($item_type_scope) . ' class="trail-all-events"><a href="' . esc_url(tribe_get_events_link()) . '" title="' . esc_attr__('All Events', 'total') . '" itemprop="url"><span itemprop="title">' . esc_html__('All Events', 'total') . '</span></a></span>';
             }
         } elseif ('portfolio' == $post_type) {
             // Portfolio main page
             $page_id = wpex_parse_obj_id(wpex_get_mod('portfolio_page'), 'page');
             if ($page_id) {
                 $page_permalink = get_permalink($page_id);
                 $page_name = get_the_title($page_id);
                 if ($page_permalink && $page_name) {
                     $trail['portfolio'] = '<span ' . esc_attr($item_type_scope) . ' class="trail-portfolio-url"> <a href="' . esc_url($page_permalink) . '" title="' . esc_attr($page_name) . '" itemprop="url"><span itemprop="title">' . $page_name . '</span></a></span>';
                 }
             }
             // Portfolio Categories
             if ($terms = $this->get_post_terms($taxonomy = 'portfolio_category')) {
                 $trail['categories'] = '<span class="trail-post-categories">' . $terms . '</span>';
             }
         } elseif ('staff' == $post_type) {
             // Staff main page
//.........这里部分代码省略.........
开发者ID:iq007,项目名称:MadScape,代码行数:101,代码来源:breadcrumbs.php

示例11: ecs_fetch_events

    /**
     * Fetch and return required events.
     * @param  array $atts 	shortcode attributes
     * @return string 	shortcode output
     */
    public function ecs_fetch_events($atts)
    {
        /**
         * Check if events calendar plugin method exists
         */
        if (!function_exists('tribe_get_events')) {
            return;
        }
        global $wp_query, $post;
        $output = '';
        $ecs_event_tax = '';
        extract(shortcode_atts(array('cat' => '', 'month' => '', 'limit' => 5, 'eventdetails' => 'true', 'time' => null, 'past' => null, 'venue' => 'false', 'author' => null, 'message' => 'There are no upcoming events at this time.', 'key' => 'End Date', 'order' => 'ASC', 'viewall' => 'false', 'excerpt' => 'false', 'thumb' => 'false', 'thumbwidth' => '', 'thumbheight' => '', 'contentorder' => 'title, thumbnail, excerpt, date, venue'), $atts, 'ecs-list-events'), EXTR_PREFIX_ALL, 'ecs');
        // Category
        if ($ecs_cat) {
            $ecs_cats = explode(",", $ecs_cat);
            $ecs_cats = array_map('trim', $ecs_cats);
            $ecs_event_tax = array(array('taxonomy' => 'tribe_events_cat', 'field' => 'slug', 'terms' => $ecs_cat));
        }
        // Past Event
        $meta_date_compare = '>=';
        $meta_date_date = date('Y-m-d');
        if ($ecs_time == 'past' || !empty($ecs_past)) {
            $meta_date_compare = '<';
        }
        // Key
        if (str_replace(' ', '', trim(strtolower($ecs_key))) == 'startdate') {
            $ecs_key = '_EventStartDate';
        } else {
            $ecs_key = '_EventEndDate';
        }
        // Date
        $ecs_meta_date = array(array('key' => $ecs_key, 'value' => $meta_date_date, 'compare' => $meta_date_compare, 'type' => 'DATETIME'));
        // Specific Month
        if ($ecs_month == 'current') {
            $ecs_month = date('Y-m');
        }
        if ($ecs_month) {
            $month_array = explode("-", $ecs_month);
            $month_yearstr = $month_array[0];
            $month_monthstr = $month_array[1];
            $month_startdate = date($month_yearstr . "-" . $month_monthstr . "-1");
            $month_enddate = date($month_yearstr . "-" . $month_monthstr . "-t");
            $ecs_meta_date = array(array('key' => $ecs_key, 'value' => array($month_startdate, $month_enddate), 'compare' => 'BETWEEN', 'type' => 'DATETIME'));
        }
        $posts = get_posts(array('post_type' => 'tribe_events', 'posts_per_page' => $ecs_limit, 'tax_query' => $ecs_event_tax, 'meta_key' => $ecs_key, 'orderby' => 'meta_value', 'author' => $ecs_author, 'order' => $ecs_order, 'meta_query' => array($ecs_meta_date)));
        if ($posts) {
            $output .= '<ul class="ecs-event-list">';
            $ecs_contentorder = explode(',', $ecs_contentorder);
            foreach ($posts as $post) {
                setup_postdata($post);
                $output .= '<li class="ecs-event">';
                // Put Values into $output
                foreach ($ecs_contentorder as $contentorder) {
                    switch (trim($contentorder)) {
                        case 'title':
                            $output .= '<h4 class="entry-title summary">' . '<a href="' . tribe_get_event_link() . '" rel="bookmark">' . get_the_title() . '</a>
										</h4>';
                            break;
                        case 'thumbnail':
                            if (self::isValid($ecs_thumb)) {
                                $thumbWidth = is_numeric($ecs_thumbwidth) ? $ecs_thumbwidth : '';
                                $thumbHeight = is_numeric($ecs_thumbheight) ? $ecs_thumbheight : '';
                                if (!empty($thumbWidth) && !empty($thumbHeight)) {
                                    $output .= get_the_post_thumbnail(get_the_ID(), array($thumbWidth, $thumbHeight));
                                } else {
                                    $output .= get_the_post_thumbnail(get_the_ID(), 'medium');
                                }
                            }
                            break;
                        case 'excerpt':
                            if (self::isValid($ecs_excerpt)) {
                                $excerptLength = is_numeric($ecs_excerpt) ? $ecs_excerpt : 100;
                                $output .= '<p class="ecs-excerpt">' . self::get_excerpt($excerptLength) . '</p>';
                            }
                            break;
                        case 'date':
                            if (self::isValid($ecs_eventdetails)) {
                                $output .= '<span class="duration time">' . tribe_events_event_schedule_details() . '</span>';
                            }
                            break;
                        case 'venue':
                            if (self::isValid($ecs_venue)) {
                                $output .= '<span class="duration venue"><em> at </em>' . tribe_get_venue() . '</span>';
                            }
                            break;
                    }
                }
                $output .= '</li>';
            }
            $output .= '</ul>';
            if (self::isValid($ecs_viewall)) {
                $output .= '<span class="ecs-all-events"><a href="' . tribe_get_events_link() . '" rel="bookmark">' . translate('View All Events', 'tribe-events-calendar') . '</a></span>';
            }
        } else {
            //No Events were Found
//.........这里部分代码省略.........
开发者ID:aelia-co,项目名称:The-Events-Calendar-Shortcode,代码行数:101,代码来源:the-events-calendar-shortcode.php

示例12: asset_package

 /**
  * Asset calls for vendor packages
  *
  * @param string $name
  * @param array  $deps Dependents
  */
 public static function asset_package($name, $deps = array())
 {
     $tec = TribeEvents::instance();
     $prefix = 'tribe-events';
     // TribeEvents::POSTTYPE;
     // setup plugin resources & 3rd party vendor urls
     $resources_url = trailingslashit($tec->pluginUrl) . 'resources/';
     $vendor_url = trailingslashit($tec->pluginUrl) . 'vendor/';
     // @TODO make this more DRY
     switch ($name) {
         case 'jquery-resize':
             $path = self::getMinFile($vendor_url . 'jquery-resize/jquery.ba-resize.js', true);
             $deps = array_merge($deps, array('jquery'));
             wp_enqueue_script($prefix . '-jquery-resize', $path, $deps, '1.1', false);
             self::$vendor_scripts[] = $prefix . '-jquery-resize';
             break;
         case 'chosen':
             // Vendor: jQuery Chosen
             $deps = array_merge($deps, array('jquery'));
             $css_path = self::getMinFile($vendor_url . 'chosen/public/chosen.css', true);
             $path = self::getMinFile($vendor_url . 'chosen/public/chosen.jquery.js', true);
             wp_enqueue_style($prefix . '-chosen-style', $css_path);
             wp_enqueue_script($prefix . '-chosen-jquery', $path, $deps, '0.9.5', false);
             self::$vendor_scripts[] = $prefix . '-chosen-jquery';
             break;
         case 'smoothness':
             // Vendor: jQuery Custom Styles
             $path = self::getMinFile($vendor_url . 'jquery/smoothness/jquery-ui-1.8.23.custom.css', true);
             wp_enqueue_style($prefix . '-custom-jquery-styles', $path);
             break;
         case 'select2':
             // Vendor: Select2
             $css_path = self::getMinFile($vendor_url . 'select2/select2.css', true);
             $path = self::getMinFile($vendor_url . 'select2/select2.js', true);
             wp_enqueue_style($prefix . '-select2-css', $css_path);
             wp_enqueue_script($prefix . '-select2', $path, 'jquery', '3.2');
             self::$vendor_scripts[] = $prefix . '-select2';
             break;
         case 'calendar-script':
             // Tribe Events JS
             $deps = array_merge($deps, array('jquery'), self::$vendor_scripts);
             $path = self::getMinFile($resources_url . 'tribe-events.js', true);
             wp_enqueue_script($prefix . '-calendar-script', $path, $deps, apply_filters('tribe_events_js_version', TribeEvents::VERSION));
             $js_config_array = array('permalink_settings' => get_option('permalink_structure'), 'events_post_type' => TribeEvents::POSTTYPE, 'events_base' => tribe_get_events_link());
             wp_localize_script($prefix . '-calendar-script', 'tribe_js_config', $js_config_array);
             break;
         case 'datepicker':
             // Vendor: jQuery Datepicker
             wp_enqueue_script('jquery-ui-datepicker');
             wp_enqueue_style('jquery-ui-datepicker');
             self::$vendor_scripts[] = 'jquery-ui-datepicker';
             break;
         case 'bootstrap-datepicker':
             // Vendor: Bootstrap Datepicker
             $css_path = self::getMinFile($vendor_url . 'bootstrap-datepicker/css/datepicker.css', true);
             $path = self::getMinFile($vendor_url . 'bootstrap-datepicker/js/bootstrap-datepicker.js', true);
             wp_enqueue_style($prefix . '-bootstrap-datepicker-css', $css_path);
             wp_enqueue_script($prefix . '-bootstrap-datepicker', $path, 'jquery', '3.2');
             self::$vendor_scripts[] = $prefix . '-bootstrap-datepicker';
             $localized_datepicker_array = array('days' => array_merge($tec->daysOfWeek, array($tec->daysOfWeek[0])), 'daysShort' => array_merge($tec->daysOfWeekShort, array($tec->daysOfWeekShort[0])), 'daysMin' => array_merge($tec->daysOfWeekMin, array($tec->daysOfWeekMin[0])), 'months' => array_values($tec->monthsFull), 'monthsShort' => array_values($tec->monthsShort), 'clear' => 'Clear', 'today' => 'Today');
             wp_localize_script($prefix . '-bootstrap-datepicker', 'tribe_bootstrap_datepicker_strings', array('dates' => $localized_datepicker_array));
             break;
         case 'dialog':
             // Vendor: jQuery Dialog
             wp_enqueue_script('jquery-ui-dialog');
             self::$vendor_scripts[] = 'jquery-ui-dialog';
             break;
         case 'admin-ui':
             // Tribe Events
             $path = self::getMinFile($resources_url . 'events-admin.css', true);
             wp_enqueue_style($prefix . '-admin-ui', $path, array(), TribeEvents::VERSION);
             break;
         case 'admin':
             $deps = array_merge($deps, array('jquery', 'jquery-ui-datepicker'));
             $path = self::getMinFile($resources_url . 'events-admin.js', true);
             wp_enqueue_script($prefix . '-admin', $path, $deps, apply_filters('tribe_events_js_version', TribeEvents::VERSION), true);
             break;
         case 'settings':
             $deps = array_merge($deps, array('jquery'));
             $path = self::getMinFile($resources_url . 'tribe-settings.js', true);
             wp_enqueue_script($prefix . '-settings', $path, $deps, apply_filters('tribe_events_js_version', TribeEvents::VERSION), true);
             break;
         case 'ecp-plugins':
             $deps = array_merge($deps, array('jquery'));
             $path = self::getMinFile($resources_url . 'jquery-ecp-plugins.js', true);
             wp_enqueue_script($prefix . '-ecp-plugins', $path, $deps, apply_filters('tribe_events_js_version', TribeEvents::VERSION));
             break;
         case 'tribe-events-bar':
             $deps = array_merge($deps, array('jquery', $prefix . '-calendar-script', $prefix . '-bootstrap-datepicker', $prefix . '-jquery-resize', self::get_placeholder_handle()));
             $path = self::getMinFile($resources_url . 'tribe-events-bar.js', true);
             wp_enqueue_script($prefix . '-bar', $path, $deps, apply_filters('tribe_events_js_version', TribeEvents::VERSION));
             break;
         case 'jquery-placeholder':
             // Vendor: jQuery Placeholder
//.........这里部分代码省略.........
开发者ID:chicosilva,项目名称:olharambiental,代码行数:101,代码来源:tribe-template-factory.class.php

示例13: avia_events_breadcrumb

 function avia_events_breadcrumb($trail)
 {
     global $avia_config;
     if (isset($avia_config['currently_viewing']) && $avia_config['currently_viewing'] == 'events' || tribe_is_month() || get_post_type() === TribeEvents::POSTTYPE || is_tax(TribeEvents::TAXONOMY)) {
         $events = __('Events', 'avia_framework');
         $events_link = '<a href="' . tribe_get_events_link() . '">' . $events . '</a>';
         if (is_tax(TribeEvents::TAXONOMY)) {
             $last = array_pop($trail);
             $trail[] = $events_link;
             $trail[] = $last;
         } else {
             if (tribe_is_month() || tribe_is_upcoming() && !is_singular()) {
                 $trail[] = $events_link;
             } else {
                 if (tribe_is_event()) {
                     $last = array_pop($trail);
                     $trail[] = $events_link;
                     $trail[] = $last;
                 }
             }
         }
         if (isset($avia_config['events_trail'])) {
             $trail = $avia_config['events_trail'];
         }
     }
     return $trail;
 }
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:27,代码来源:config.php

示例14: ecs_fetch_events


//.........这里部分代码省略.........
             setup_postdata($post);
             $output .= '<li class="ecs-event">';
             // Put Values into $output
             foreach ($atts['contentorder'] as $contentorder) {
                 switch (trim($contentorder)) {
                     case 'title':
                         $moreInfo_Publico_Alvo = get_field("event_basicInfo_publico_alvo");
                         $moreInfo_Instrutor = get_field("event_basicInfo_instrutor");
                         $moreInfo_Duracao = get_field("event_basicInfo_duracao");
                         $output .= '<h4 class="entry-title summary">' . '<a href="' . tribe_get_event_link() . '" rel="bookmark">' . apply_filters('ecs_event_list_title', get_the_title(), $atts) . '</a>
                       </h4>';
                         if ($moreInfo_Publico_Alvo) {
                             $output .= '<div class="basicInfo publico_alvo"><p>Publico Alvo:</p><span> ' . $moreInfo_Publico_Alvo . '</span></div>';
                         }
                         if ($moreInfo_Instrutor) {
                             $output .= '<div class="basicInfo instrutor"><p>Instrutor: </p><span> ' . $moreInfo_Instrutor . '</span></div>';
                         }
                         if ($moreInfo_Instrutor || $moreInfo_Duracao) {
                             $output .= '<span class="basicInfo divider"> | </span>';
                         }
                         if ($moreInfo_Duracao) {
                             $output .= '<div class="basicInfo duracao"><p>Duracao:</p><span> ' . $moreInfo_Duracao . ' horas</span></div>';
                         }
                         break;
                     case 'thumbnail':
                         if (self::isValid($atts['thumb'])) {
                             $thumbWidth = is_numeric($atts['thumbwidth']) ? $atts['thumbwidth'] : '';
                             $thumbHeight = is_numeric($atts['thumbheight']) ? $atts['thumbheight'] : '';
                             if (!empty($thumbWidth) && !empty($thumbHeight)) {
                                 $output .= get_the_post_thumbnail(get_the_ID(), array($thumbWidth, $thumbHeight));
                             } else {
                                 $size = !empty($thumbWidth) && !empty($thumbHeight) ? array($thumbWidth, $thumbHeight) : 'medium';
                                 if ($thumb = get_the_post_thumbnail(get_the_ID(), $size)) {
                                     $output .= '<a href="' . tribe_get_event_link() . '">';
                                     $output .= $thumb;
                                     $output .= '</a>';
                                 }
                             }
                         }
                         break;
                     case 'excerpt':
                         if (self::isValid($atts['excerpt'])) {
                             $excerptLength = is_numeric($atts['excerpt']) ? $atts['excerpt'] : 1500;
                             //$moreInfo_date = get_field("event_moreInfo_date");
                             //$moreInfo_video = get_field("event_moreInfo_video");
                             $moreInfo_inscription = get_field("event_moreInfo_inscricao");
                             $moreInfo_download = get_field("event_moreInfo_baixar");
                             $output .= '<p class="ecs-excerpt">' . self::get_excerpt($excerptLength) . '</p>';
                             if ($moreInfo_inscription || $moreInfo_download) {
                                 $output .= '<div class="moreInfo">
                             <p>Saiba mais: </p>';
                             }
                             if (self::isValid($atts['eventdetails'])) {
                                 //$output .= '<a class="icon date" href=""><img title="'.tribe_events_event_schedule_details().'" src="'.get_template_directory_uri().'/library/images/event_moreInfo/moreInfo_date.png"/></a>';
                             }
                             /*if ($moreInfo_video) {
                                   $output .= '<a class="icon video" href="'.$moreInfo_video.'"><img src="'.get_template_directory_uri().'/library/images/event_moreInfo/moreInfo_video.png"/></a>';
                               }*/
                             if ($moreInfo_inscription) {
                                 $output .= '<a class="icon inscription" title="Inscricao" href="' . $moreInfo_inscription . '"><img src="' . get_template_directory_uri() . '/library/images/event_moreInfo/moreInfo_inscription.png"/></a>';
                             }
                             if ($moreInfo_download) {
                                 $output .= '<a class="icon baixar" title="Baixar" href="' . $moreInfo_download . '" target="_blank"><img src="' . get_template_directory_uri() . '/library/images/event_moreInfo/moreInfo_download.png"/></a>';
                             }
                             if ($moreInfo_inscription || $moreInfo_download) {
                                 $output .= '</div>';
                             }
                         }
                         break;
                         /*case 'more_info' :
                         		if( self::isValid($atts['more_info']) ) {
                         			$output .= '<div class="moreInfo">' .the_field(event_moreInfo_inscricao). '</div>';
                         		}
                         		break;*/
                     /*case 'more_info' :
                     		if( self::isValid($atts['more_info']) ) {
                     			$output .= '<div class="moreInfo">' .the_field(event_moreInfo_inscricao). '</div>';
                     		}
                     		break;*/
                     case 'venue':
                         if (self::isValid($atts['venue'])) {
                             $output .= '<span class="duration venue"><em> at </em>' . apply_filters('ecs_event_list_venue', tribe_get_venue(), $atts) . '</span>';
                         }
                         break;
                 }
             }
             $output .= '</li>';
         }
         $output .= '</ul>';
         if (self::isValid($atts['viewall'])) {
             $output .= '<span class="ecs-all-events"><a href="' . apply_filters('ecs_event_list_viewall_link', tribe_get_events_link(), $atts) . '" rel="bookmark">' . translate('View All Events', 'tribe-events-calendar') . '</a></span>';
         }
     } else {
         //No Events were Found
         $output .= translate($atts['message'], 'tribe-events-calendar');
     }
     // endif
     wp_reset_query();
     return $output;
 }
开发者ID:petersondrs,项目名称:SiteMople,代码行数:101,代码来源:mople-calendar-shortcode.php

示例15: reset_page_title

 /**
  * Sets the page title for the various PRO views.
  *
  * @param string $title The current title.
  *
  * @return string The modified title.
  */
 function reset_page_title($title, $depth = true)
 {
     global $wp_query;
     $tec = TribeEvents::instance();
     $date_format = apply_filters('tribe_events_pro_page_title_date_format', tribe_get_date_format(true));
     if (tribe_is_showing_all()) {
         $reset_title = sprintf('%s %s', __('All events for', 'tribe-events-calendar-pro'), get_the_title());
     }
     // week view title
     if (tribe_is_week()) {
         $reset_title = sprintf(__('Events for week of %s', 'tribe-events-calendar-pro'), date_i18n($date_format, strtotime(tribe_get_first_week_day($wp_query->get('start_date')))));
     }
     if (!empty($reset_title) && is_tax($tec->get_event_taxonomy()) && $depth) {
         $cat = get_queried_object();
         $reset_title = '<a href="' . tribe_get_events_link() . '">' . $reset_title . '</a>';
         $reset_title .= ' &#8250; ' . $cat->name;
     }
     return isset($reset_title) ? apply_filters('tribe_template_factory_debug', $reset_title, 'tribe_get_events_title') : $title;
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:26,代码来源:events-calendar-pro.php


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