本文整理汇总了PHP中tribe_get_event_label_plural函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_get_event_label_plural函数的具体用法?PHP tribe_get_event_label_plural怎么用?PHP tribe_get_event_label_plural使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_get_event_label_plural函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: 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('« ' . esc_html__('All %s', 'the-events-calendar'), tribe_get_event_label_plural());
?>
</a>
</p>
<?php
}
}
开发者ID:TakenCdosG,项目名称:chefs,代码行数:16,代码来源:List_View.php
示例2: die
<?php
/**
* Month View Single Day
* This file contains one day in the month grid
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/month/single-day.php
*
* @package TribeEventsCalendar
*
*/
if (!defined('ABSPATH')) {
die('-1');
}
$day = tribe_events_get_current_month_day();
$events_label = 1 === $day['total_events'] ? tribe_get_event_label_singular() : tribe_get_event_label_plural();
?>
<!-- Day Header -->
<div id="tribe-events-daynum-<?php
echo $day['daynum-id'];
?>
">
<?php
if ($day['total_events'] > 0 && tribe_events_is_view_enabled('day')) {
?>
<a href="<?php
echo esc_url(tribe_get_day_link($day['date']));
?>
"><?php
echo $day['daynum'];
?>
开发者ID:montreyw,项目名称:Theme-Redesign-and-SEO-Overhaul,代码行数:31,代码来源:single-day.php
示例3: die
* readme on templates hooks and filters
*
* @package TribeEventsCalendarPro
*
*/
if (!defined('ABSPATH')) {
die('-1');
}
$posts = tribe_get_related_posts();
if (is_array($posts) && !empty($posts)) {
?>
<div class="related-posts single-related-posts">
<?php
echo do_shortcode(sprintf('[title size="3" content_align="left" sep_color="%s" style_type="default"]%s[/title]', Avada()->settings->get('ec_border_color'), sprintf(__('Related %s', 'tribe-events-calendar-pro'), tribe_get_event_label_plural())));
?>
<ul class="tribe-related-events tribe-clearfix hfeed vcalendar">
<?php
foreach ($posts as $post) {
?>
<li>
<?php
$thumb = has_post_thumbnail($post->ID) ? get_the_post_thumbnail($post->ID, 'large') : '<img src="' . esc_url(trailingslashit(Tribe__Events__Pro__Main::instance()->pluginUrl) . 'src/resources/images/tribe-related-events-placeholder.png') . '" alt="' . esc_attr(get_the_title($post->ID)) . '" />';
?>
<div class="tribe-related-events-thumbnail hover-type-<?php
echo Avada()->settings->get('ec_hover_type');
?>
">
开发者ID:mattholsen,项目名称:caseylab,代码行数:31,代码来源:related-events.php
示例4: tribe_get_event_label_plural
<?php
/**
* List View Nav Template
* This file loads the list view navigation.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/nav.php
*
* @package TribeEventsCalendar
*
*/
global $wp_query;
$events_label_plural = tribe_get_event_label_plural();
if (!defined('ABSPATH')) {
die('-1');
}
?>
<h3 class="tribe-events-visuallyhidden"><?php
echo esc_html(sprintf(esc_html__('%s List Navigation', 'the-events-calendar'), $events_label_plural));
?>
</h3>
<ul class="tribe-events-sub-nav">
<!-- Left Navigation -->
<?php
if (tribe_has_previous_event()) {
?>
<li class="<?php
echo esc_attr(tribe_left_navigation_classes());
?>
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:31,代码来源:nav.php
示例5: maybe_add_link
/**
* Generates the markup for the "iCal Import" link for the views.
*/
public static function maybe_add_link()
{
global $wp_query;
$show_ical = apply_filters('tribe_events_list_show_ical_link', true);
if (!$show_ical) {
return;
}
if (tribe_is_month() && !tribe_events_month_has_events()) {
return;
}
if (is_single() || !have_posts()) {
return;
}
$tec = Tribe__Events__Main::instance();
$view = $tec->displaying;
if (defined('DOING_AJAX') && DOING_AJAX && isset($wp_query->query_vars['eventDisplay'])) {
$view = $wp_query->query_vars['eventDisplay'];
}
switch (strtolower($view)) {
case 'month':
$modifier = sprintf(esc_html__("Month's %s", 'the-events-calendar'), tribe_get_event_label_plural());
break;
case 'week':
$modifier = sprintf(esc_html__("Week's %s", 'the-events-calendar'), tribe_get_event_label_plural());
break;
case 'day':
$modifier = sprintf(esc_html__("Day's %s", 'the-events-calendar'), tribe_get_event_label_plural());
break;
default:
$modifier = sprintf(esc_html__('Listed %s', 'the-events-calendar'), tribe_get_event_label_plural());
break;
}
$text = apply_filters('tribe_events_ical_export_text', esc_html__('Export', 'the-events-calendar') . ' ' . $modifier);
$title = esc_html__('Use this to share calendar data with Google Calendar, Apple iCal and other compatible apps', 'the-events-calendar');
$ical = '<a class="tribe-events-ical tribe-events-button" title="' . $title . '" href="' . esc_url(tribe_get_ical_link()) . '">+ ' . $text . '</a>';
//echo $ical;
}
开发者ID:AC85,项目名称:musikschule-wp-theme,代码行数:40,代码来源:iCal.php
示例6: nothing_found_notice
/**
* Sets an appropriate no results found message.
*/
protected function nothing_found_notice()
{
$events_label_plural = tribe_get_event_label_plural();
list($search_term, $tax_term, $geographic_term) = $this->get_search_terms();
if (!empty($search_term)) {
Tribe__Events__Main::setNotice('event-search-no-results', sprintf(__('There were no results found for <strong>"%s"</strong> this month. Try searching next month.', 'tribe-events-calendar'), esc_html($search_term)));
} elseif (!empty($tax_term)) {
Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No matching %s listed under %s. Please try viewing the full calendar for a complete list of events.', 'tribe-events-calendar'), strtolower($events_label_plural), $tax_term));
} else {
Tribe__Events__Main::setNotice('event-search-no-results', __('There were no results found.', 'tribe-events-calendar'));
}
}
开发者ID:uoyknaht,项目名称:kc,代码行数:15,代码来源:Month.php
示例7: die
*/
if (!defined('ABSPATH')) {
die('-1');
}
$venue_id = get_the_ID();
while (have_posts()) {
the_post();
?>
<div class="tribe-events-venue">
<p class="tribe-events-back">
<a href="<?php
echo esc_url(tribe_get_events_link());
?>
" rel="bookmark"><?php
printf(__('← Back to %s', 'tribe-events-calendar-pro'), tribe_get_event_label_plural());
?>
</a>
</p>
<div class="tribe-events-venue-meta vcard tribe-clearfix">
<?php
if (tribe_embed_google_map() && tribe_address_exists()) {
?>
<!-- Venue Map -->
<div class="tribe-events-map-wrap">
<?php
echo tribe_get_embedded_map($venue_id, '100%', '200px');
?>
</div><!-- .tribe-events-map-wrap -->
开发者ID:simple-beck,项目名称:project-gc,代码行数:31,代码来源:single-venue.php
示例8: nothing_found_notice
protected function nothing_found_notice()
{
$events_label_plural = tribe_get_event_label_plural();
list($search_term, $tax_term, $geographic_term) = $this->get_search_terms();
if (empty($search_term) && empty($geographic_term) && !empty($tax_term)) {
Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No matching %s listed under %s scheduled for <strong>%s</strong>. Please try another day.', 'tribe-events-calendar'), strtolower($events_label_plural), $tax_term, date_i18n(tribe_get_date_format(true), strtotime(get_query_var('eventDate')))));
} elseif (empty($search_term) && empty($geographic_term)) {
Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No %s scheduled for <strong>%s</strong>. Please try another day.', 'tribe-events-calendar'), strtolower($events_label_plural), date_i18n(tribe_get_date_format(true), strtotime(get_query_var('eventDate')))));
} else {
parent::nothing_found_notice();
}
}
开发者ID:Alexander-smirnov,项目名称:infomist,代码行数:12,代码来源:Day.php
示例9: die
* You can use any or all filters included in this file or create your own filters in
* your functions.php. In order to modify or extend a single filter, please see our
* readme on templates hooks and filters
*
* @package TribeEventsCalendarPro
*
*/
if (!defined('ABSPATH')) {
die('-1');
}
$posts = tribe_get_related_posts();
if (is_array($posts) && !empty($posts)) {
?>
<h3 class="tribe-events-related-events-title"><?php
printf(__('Related %s', 'tribe-events-calendar-pro'), tribe_get_event_label_plural());
?>
</h3>
<ul class="tribe-related-events tribe-clearfix">
<?php
foreach ($posts as $post) {
?>
<li>
<?php
$thumb = has_post_thumbnail($post->ID) ? get_the_post_thumbnail($post->ID, 'large') : '<img src="' . esc_url(trailingslashit(Tribe__Events__Pro__Main::instance()->pluginUrl) . 'src/resources/images/tribe-related-events-placeholder.png') . '" alt="' . esc_attr(get_the_title($post->ID)) . '" />';
?>
<div class="tribe-related-events-thumbnail">
<a href="<?php
echo esc_url(tribe_get_event_link($post));
?>
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:31,代码来源:related-events.php
示例10: tribe_events_get_this_week_title
/**
* This Week - Title
*
* @param string $this_week_title
*
* @return string
*/
function tribe_events_get_this_week_title($start_date)
{
$events_label_plural = tribe_get_event_label_plural();
$date_format = apply_filters('tribe_events_pro_page_title_date_format', tribe_get_date_format(true));
$this_week_title = sprintf(__('%s for week of %s', 'tribe-events-calendar-pro'), $events_label_plural, date_i18n($date_format, strtotime($start_date)));
return $this_week_title;
}
开发者ID:jamestrevorlees,项目名称:odd-web-v1.00,代码行数:14,代码来源:widgets.php
示例11: esc_attr
echo esc_attr($filter['name']);
?>
"><?php
echo $filter['caption'];
?>
</label>
<?php
echo $filter['html'];
?>
</div>
<?php
}
?>
<div class="tribe-bar-submit">
<input class="tribe-events-button tribe-no-param" type="submit" name="submit-bar" value="<?php
printf(__('Find %s', 'rescue'), tribe_get_event_label_plural());
?>
" />
</div><!-- .tribe-bar-submit -->
</div><!-- .tribe-bar-filters-inner -->
</div><!-- .tribe-bar-filters -->
<?php
}
// if ( !empty( $filters ) )
?>
</form><!-- #tribe-bar-form -->
</div><!-- #tribe-events-bar -->
<?php
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:31,代码来源:bar.php
示例12: this_week_template_vars
/**
* This Week Widget - Data Attributes for Ajax
*
*
*/
public static function this_week_template_vars($this_week_query_vars)
{
$this_week_template_vars['layout'] = $this_week_query_vars['layout'];
$this_week_template_vars['start_date'] = $this_week_query_vars['start_date'];
$this_week_template_vars['end_date'] = $this_week_query_vars['end_date'];
$this_week_template_vars['hide_weekends'] = $this_week_query_vars['hide_weekends'];
$this_week_template_vars['events_label_singular'] = tribe_get_event_label_singular();
$this_week_template_vars['events_label_plural'] = tribe_get_event_label_plural();
return $this_week_template_vars;
}
开发者ID:TakenCdosG,项目名称:chefs,代码行数:15,代码来源:This_Week.php
示例13: do_action
do_action('tribe_events_widget_list_inside_after_loop');
?>
<?php
}
?>
</ol><!-- .hfeed -->
<p class="tribe-events-widget-link">
<a class="button radius" href="<?php
esc_attr_e(esc_url($link_to_all));
?>
" rel="bookmark">
<?php
_e('View More…', 'rescue');
?>
</a>
</p>
<?php
// No Events were found.
} else {
?>
<p><?php
printf(__('There are no upcoming %s at this time.', 'rescue'), strtolower(tribe_get_event_label_plural()));
?>
</p>
<?php
}
// Cleanup. Do not remove this.
wp_reset_postdata();
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:31,代码来源:list-widget.php
示例14: tribe_get_events_title
/**
* Event Title
*
* Return an event's title with pseudo-breadcrumb if on a category
*
* @param bool $depth include linked title
*
* @return string title
* @todo move logic to template classes
*/
function tribe_get_events_title($depth = true)
{
$events_label_plural = tribe_get_event_label_plural();
global $wp_query;
$tribe_ecp = Tribe__Events__Main::instance();
$title = sprintf(__('Upcoming %s', 'tribe-events-calendar'), $events_label_plural);
// If there's a date selected in the tribe bar, show the date range of the currently showing events
if (isset($_REQUEST['tribe-bar-date']) && $wp_query->have_posts()) {
if ($wp_query->get('paged') > 1) {
// if we're on page 1, show the selected tribe-bar-date as the first date in the range
$first_event_date = tribe_get_start_date($wp_query->posts[0], false);
} else {
//otherwise show the start date of the first event in the results
$first_event_date = tribe_event_format_date($_REQUEST['tribe-bar-date'], false);
}
$last_event_date = tribe_get_end_date($wp_query->posts[count($wp_query->posts) - 1], false);
$title = sprintf(__('%1$s for %2$s - %3$s', 'tribe-events-calendar'), $events_label_plural, $first_event_date, $last_event_date);
} elseif (tribe_is_past()) {
$title = sprintf(__('Past %s', 'tribe-events-calendar'), $events_label_plural);
}
if (tribe_is_month()) {
$title = sprintf(__('%1$s for %2$s', 'tribe-events-calendar'), $events_label_plural, date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())));
}
// day view title
if (tribe_is_day()) {
$title = sprintf(__('%1$s for %2$s', 'tribe-events-calendar'), $events_label_plural, date_i18n(tribe_get_date_format(true), strtotime($wp_query->get('start_date'))));
}
if (is_tax($tribe_ecp->get_event_taxonomy()) && $depth) {
$cat = get_queried_object();
$title = '<a href="' . esc_url(tribe_get_events_link()) . '">' . $title . '</a>';
$title .= ' › ' . $cat->name;
}
return apply_filters('tribe_get_events_title', $title, $depth);
}
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:44,代码来源:loop.php
示例15: tribe_recurring_instances_toggle
function tribe_recurring_instances_toggle($postId = null)
{
$hide_recurrence = !empty($_REQUEST['tribeHideRecurrence']) && $_REQUEST['tribeHideRecurrence'] == '1' || empty($_REQUEST['tribeHideRecurrence']) && empty($_REQUEST['action']) && tribe_get_option('hideSubsequentRecurrencesDefault', false) ? '1' : false;
if (!tribe_is_week() && !tribe_is_month()) {
echo '<span class="tribe-events-user-recurrence-toggle">';
echo '<label for="tribeHideRecurrence">';
echo '<input type="checkbox" name="tribeHideRecurrence" value="1" id="tribeHideRecurrence" ' . checked($hide_recurrence, 1, false) . '>' . sprintf(__('Show only the first upcoming instance of recurring %s', 'tribe-events-calendar-pro'), strtolower(tribe_get_event_label_plural()));
echo '</label>';
echo '</span>';
}
}
开发者ID:simple-beck,项目名称:project-gc,代码行数:11,代码来源:general.php
示例16: do_action
<?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));
?>
" rel="bookmark">
<?php
esc_html_e('View More…', 'tribe-events-calendar-pro');
?>
</a>
</p>
<?php
// No Events were found.
} else {
?>
<p><?php
printf(__('There are no upcoming %s at this time.', 'the-events-calendar'), strtolower(tribe_get_event_label_plural()));
?>
</p>
<?php
}
// Cleanup. Do not remove this.
wp_reset_postdata();
开发者ID:agiper,项目名称:wordpress,代码行数:31,代码来源:list-widget.php
示例17: die
* your functions.php. In order to modify or extend a single filter, please see our
* readme on templates hooks and filters
*
* @package TribeEventsCalendarPro
*
*/
if (!defined('ABSPATH')) {
die('-1');
}
$posts = tribe_get_related_posts();
if (is_array($posts) && !empty($posts)) {
?>
<div class="related-posts single-related-posts">
<?php
echo Avada()->template->title_template(sprintf(__('Related %s', 'tribe-events-calendar-pro'), tribe_get_event_label_plural()), '3');
?>
<ul class="tribe-related-events tribe-clearfix hfeed vcalendar">
<?php
foreach ($posts as $post) {
?>
<li>
<?php
$thumb = has_post_thumbnail($post->ID) ? get_the_post_thumbnail($post->ID, 'large') : '<img src="' . esc_url(trailingslashit(Tribe__Events__Pro__Main::instance()->pluginUrl) . 'src/resources/images/tribe-related-events-placeholder.png') . '" alt="' . esc_attr(get_the_title($post->ID)) . '" />';
?>
<div class="tribe-related-events-thumbnail hover-type-<?php
echo Avada()->settings->get('ec_hover_type');
?>
">
<a href="<?php
开发者ID:sdxlgc,项目名称:net-wp_sdgcxl-htdocs,代码行数:31,代码来源:related-events.php
示例18: 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
示例19: 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 = '';
$atts = shortcode_atts(array('cat' => '', 'month' => '', 'limit' => 5, 'eventdetails' => 'true', 'time' => null, 'past' => null, 'venue' => 'false', 'author' => null, 'message' => sprintf(__('There are no upcoming %s at this time.', 'tribe-events-calendar'), tribe_get_event_label_plural()), 'key' => 'End Date', 'order' => 'ASC', 'viewall' => 'false', 'excerpt' => 'false', 'thumb' => 'false', 'thumbwidth' => '', 'thumbheight' => '', 'contentorder' => 'title, thumbnail, excerpt, date, venue', 'event_tax' => ''), $atts, 'ecs-list-events');
// Category
if ($atts['cat']) {
if (strpos($atts['cat'], ",") !== false) {
$atts['cats'] = explode(",", $atts['cat']);
$atts['cats'] = array_map('trim', $atts['cats']);
} else {
$atts['cats'] = $atts['cat'];
}
$atts['event_tax'] = array('relation' => 'OR', array('taxonomy' => 'tribe_events_cat', 'field' => 'name', 'terms' => $atts['cats']), array('taxonomy' => 'tribe_events_cat', 'field' => 'slug', 'terms' => $atts['cats']));
}
// Past Event
$meta_date_compare = '>=';
$meta_date_date = date('Y-m-d');
if ($atts['time'] == 'past' || !empty($atts['past'])) {
$meta_date_compare = '<';
}
// Key
if (str_replace(' ', '', trim(strtolower($atts['key']))) == 'startdate') {
$atts['key'] = '_EventStartDate';
} else {
$atts['key'] = '_EventEndDate';
}
// Date
$atts['meta_date'] = array(array('key' => $atts['key'], 'value' => $meta_date_date, 'compare' => $meta_date_compare, 'type' => 'DATETIME'));
// Specific Month
if ($atts['month'] == 'current') {
$atts['month'] = date('Y-m');
}
if ($atts['month']) {
$month_array = explode("-", $atts['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");
$atts['meta_date'] = array(array('key' => $atts['key'], 'value' => array($month_startdate, $month_enddate), 'compare' => 'BETWEEN', 'type' => 'DATETIME'));
}
$posts = get_posts(array('post_type' => 'tribe_events', 'posts_per_page' => $atts['limit'], 'tax_query' => $atts['event_tax'], 'meta_key' => $atts['key'], 'orderby' => 'meta_value', 'author' => $atts['author'], 'order' => $atts['order'], 'meta_query' => array($atts['meta_date'])));
if ($posts) {
$output .= '<ul class="ecs-event-list">';
$atts['contentorder'] = explode(',', $atts['contentorder']);
foreach ($posts as $post) {
setup_postdata($post);
$li_classes = 'ecs-event';
$start_date = tribe_get_start_date($post, false, 'Y-m-d');
$today = date('Y-m-d', current_time('timestamp'));
$tomorrow = date('Y-m-d', strtotime('tomorrow', current_time('timestamp')));
if ($start_date == $today) {
$li_classes .= ' ecs-today';
} else {
if ($start_date == $tomorrow) {
$li_classes .= ' ecs-tomorrow';
}
}
$output .= '<li class="' . $li_classes . '">';
// Put Values into $output
foreach ($atts['contentorder'] as $contentorder) {
switch (trim($contentorder)) {
case 'title':
$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>';
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($post->ID, array($thumbWidth, $thumbHeight));
} else {
$size = !empty($thumbWidth) && !empty($thumbHeight) ? array($thumbWidth, $thumbHeight) : 'medium';
if ($thumb = get_the_post_thumbnail($post->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'] : 100;
$output .= '<p class="ecs-excerpt">' . self::get_excerpt($excerptLength) . '</p>';
}
break;
case 'date':
//.........这里部分代码省略.........
开发者ID:rclilly,项目名称:The-Events-Calendar-Shortcode,代码行数:101,代码来源:the-events-calendar-shortcode.php
示例20: tribe_events_before_html
/**
* HTML Before Event (Display)
*
* Display HTML to output before the event template
*
* @category Events
*/
function tribe_events_before_html()
{
$events_label_plural = tribe_get_event_label_plural();
$before = stripslashes(tribe_get_option('tribeEventsBeforeHTML', ''));
$before = wptexturize($before);
$before = convert_chars($before);
$before = wpautop($before);
$before = do_shortcode(stripslashes(shortcode_unautop($before)));
$before = '<div class="tribe-events-before-html">' . $before . '</div>';
$before = $before . '<span class="tribe-events-ajax-loading"><img class="tribe-events-spinner-medium" src="' . tribe_events_resource_url('images/tribe-loading.gif') . '" alt="' . sprintf(__('Loading %s', 'tribe-events-calendar'), $events_label_plural) . '" /></span>';
echo apply_filters('tribe_events_before_html', $before);
}
开发者ID:TMBR,项目名称:johnjohn,代码行数:19,代码来源:general.php
注:本文中的tribe_get_event_label_plural函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论