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


PHP tribe_get_event_label_singular函数代码示例

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


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

示例1: set_notices

 /**
  * Set up the notices for this template
  *
  **/
 public function set_notices()
 {
     parent::set_notices();
     $events_label_singular = tribe_get_event_label_singular();
     global $post;
     // Check if event has passed
     $gmt_offset = get_option('gmt_offset') >= '0' ? ' +' . get_option('gmt_offset') : ' ' . get_option('gmt_offset');
     $gmt_offset = str_replace(array('.25', '.5', '.75'), array(':15', ':30', ':45'), $gmt_offset);
     if (!tribe_is_showing_all() && strtotime(tribe_get_end_date($post, false, 'Y-m-d G:i') . $gmt_offset) <= time()) {
         Tribe__Notices::set_notice('event-past', sprintf(esc_html__('This %s has passed.', 'the-events-calendar'), strtolower($events_label_singular)));
     }
 }
开发者ID:lizbur10,项目名称:js_finalproject,代码行数:16,代码来源:Single_Event.php

示例2: esc_html_e

    ?>
 </dt>
			<dd class="tribe-events-event-cost"> <?php 
    esc_html_e($cost);
    ?>
 </dd>
		<?php 
}
?>

		<?php 
echo tribe_get_event_categories(get_the_id(), array('before' => '', 'sep' => ', ', 'after' => '', 'label' => null, 'label_before' => '<dt>', 'label_after' => '</dt>', 'wrap_before' => '<dd class="tribe-events-event-categories">', 'wrap_after' => '</dd>'));
?>

		<?php 
echo tribe_meta_event_tags(sprintf(__('%s Tags:', 'the-events-calendar'), tribe_get_event_label_singular()), ', ', false);
?>

		<?php 
// Event Website
if (!empty($website)) {
    ?>

			<dt> <?php 
    esc_html_e('Website:', 'the-events-calendar');
    ?>
 </dt>
			<dd class="tribe-events-event-url"> <?php 
    echo $website;
    ?>
 </dd>
开发者ID:mattholsen,项目名称:caseylab,代码行数:31,代码来源:details.php

示例3: 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');
}
$events_label_singular = tribe_get_event_label_singular();
$events_label_plural = tribe_get_event_label_plural();
$day = tribe_events_get_current_month_day();
?>



<!-- Events List -->
<div class="tribe-month-single-day">
	<div class="tribe-month-daynumber" id="tribe-events-daynum-<?php 
echo trim($day['daynum']);
?>
">
		<?php 
if ($day['total_events'] > 0 && tribe_events_is_view_enabled('day')) {
    ?>
			<a href="<?php 
开发者ID:morganloehr,项目名称:chris-verna,代码行数:31,代码来源:single-day.php

示例4: filter_settings_tab_fields

 public function filter_settings_tab_fields($fields, $tab)
 {
     $this->singular_event_label = tribe_get_event_label_singular();
     $this->plural_event_label = tribe_get_event_label_plural();
     switch ($tab) {
         case 'display':
             $fields = Tribe__Events__Main::array_insert_after_key('tribeDisableTribeBar', $fields, array('hideRelatedEvents' => array('type' => 'checkbox_bool', 'label' => __('Hide related events', 'tribe-events-calendar-pro'), 'tooltip' => __('Remove related events from the single event view', 'tribe-events-calendar-pro'), 'default' => false, 'validation_type' => 'boolean')));
             $fields = Tribe__Events__Main::array_insert_after_key('monthAndYearFormat', $fields, array('weekDayFormat' => array('type' => 'text', 'label' => __('Week Day Format', 'tribe-events-calendar-pro'), 'tooltip' => __('Enter the format to use for week days. Used when showing days of the week in Week view.', 'tribe-events-calendar-pro'), 'default' => 'D jS', 'size' => 'medium', 'validation_type' => 'html')));
             $fields = Tribe__Events__Main::array_insert_after_key('hideRelatedEvents', $fields, array('week_view_hide_weekends' => array('type' => 'checkbox_bool', 'label' => __('Hide weekends on Week View', 'tribe-events-calendar-pro'), 'tooltip' => __('Check this to only show weekdays on Week View', 'tribe-events-calendar-pro'), 'default' => false, 'validation_type' => 'boolean')));
             break;
     }
     return $fields;
 }
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:13,代码来源:Main.php

示例5: column_headers

 /**
  * Add the proper column headers.
  *
  * @param array $columns The columns.
  *
  * @return array The modified column headers.
  */
 public static function column_headers($columns)
 {
     $events_label_singular = tribe_get_event_label_singular();
     foreach ((array) $columns as $key => $value) {
         $mycolumns[$key] = $value;
         if ($key == 'author') {
             $mycolumns['events-cats'] = sprintf(esc_html__('%s Categories', 'the-events-calendar'), $events_label_singular);
         }
     }
     $columns = $mycolumns;
     unset($columns['date']);
     $columns['start-date'] = esc_html__('Start Date', 'the-events-calendar');
     $columns['end-date'] = esc_html__('End Date', 'the-events-calendar');
     return $columns;
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:22,代码来源:Admin_List.php

示例6: tribe_get_event_categories

 /**
  * Event Categories (Display)
  *
  * Display the event categories with display param
  *
  * @category Events
  * @uses     tribe_get_event_taxonomy()
  * @replaces tribe_meta_event_cats()
  *
  * @param int   $post_id
  * @param array $args
  *
  * @return string $html (echo if provided in $args)
  */
 function tribe_get_event_categories($post_id = null, $args = array())
 {
     $events_label_singular = tribe_get_event_label_singular();
     $post_id = is_null($post_id) ? get_the_ID() : $post_id;
     $defaults = array('echo' => false, 'label' => null, 'label_before' => '<div>', 'label_after' => '</div>', 'wrap_before' => '<ul class="tribe-event-categories">', 'wrap_after' => '</ul>');
     $args = wp_parse_args($args, $defaults);
     $categories = tribe_get_event_taxonomy($post_id, $args);
     // check for the occurances of links in the returned string
     $label = is_null($args['label']) ? sprintf(_n('%s Category', '%s Categories', substr_count($categories, "<a href"), 'tribe-events-calendar'), $events_label_singular) : $args['label'];
     $html = !empty($categories) ? sprintf('%s%s:%s %s%s%s', $args['label_before'], $label, $args['label_after'], $args['wrap_before'], $categories, $args['wrap_after']) : '';
     if ($args['echo']) {
         echo apply_filters('tribe_get_event_categories', $html, $post_id, $args, $categories);
     } else {
         return apply_filters('tribe_get_event_categories', $html, $post_id, $args, $categories);
     }
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:30,代码来源:general.php

示例7: die

<?php

/**
 * UI for option to hide from upcoming events list
 */
// Don't load directly
if (!defined('ABSPATH')) {
    die('-1');
}
global $post;
?>
<label class="selectit"><input value="yes" type="checkbox" <?php 
checked(tribe_get_event_meta($post->ID, '_EventHideFromUpcoming') == 'yes');
?>
 name="EventHideFromUpcoming"> <?php 
printf(__('Hide From %s Listings', 'the-events-calendar'), tribe_get_event_label_singular());
?>
</label><br /><br />
<label class="selectit"><input value="yes" type="checkbox" <?php 
checked($post->menu_order == '-1');
?>
 name="EventShowInCalendar"> <?php 
_e('Sticky in Month View', 'the-events-calendar');
?>
</label> <span class="dashicons dashicons-editor-help tribe-sticky-tooltip" title="<?php 
esc_attr_e("When events are sticky in month view, they'll display first in the list of events shown within a given day block.", 'the-events-calendar');
?>
"></span>
开发者ID:hubbardsc,项目名称:field_day,代码行数:28,代码来源:event-sidebar-options.php

示例8: 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

示例9: tribe_register_meta

     */
    tribe_register_meta('tribe_event_organizer_email', array('classes' => array('meta_before' => array('email')), 'label' => __('Email:', 'the-events-calendar'), 'priority' => 30, 'filter_callback' => array('Tribe__Events__Advanced_Functions__Register_Meta', 'organizer_email'), 'group' => 'tribe_event_organizer'));
    /**
     * Register Meta: Organizer Website
     *
     * @category Organizers
     * @group tribe_event_organizer
     */
    tribe_register_meta('tribe_event_organizer_website', array('classes' => array('meta_before' => array('url')), 'label' => __('Website:', 'the-events-calendar'), 'priority' => 40, 'callback' => 'tribe_get_organizer_website_link', 'group' => 'tribe_event_organizer'));
    /**
     * Register Meta: Event Title
     *
     * @category Events
     * @group none specified
     */
    tribe_register_meta('tribe_event_title', array('classes' => array('meta_before' => array('tribe-events-meta-event-title', 'summary')), 'label' => sprintf(__('%s:', 'the-events-calendar'), tribe_get_event_label_singular()), 'callback' => array('Tribe__Events__Advanced_Functions__Register_Meta', 'the_title')));
    /**
     * Register Meta: Venue Map
     *
     * @category Venues
     * @group tribe_event_venue
     */
    tribe_register_meta('tribe_venue_map', array('wrap' => array('before' => '', 'after' => '', 'label_before' => '', 'label_after' => '', 'meta_before' => '<div class="%s">', 'meta_after' => '</div>'), 'classes' => array('meta_before' => array('tribe-events-venue-map')), 'label' => '', 'priority' => 10, 'filter_callback' => array('Tribe__Events__Advanced_Functions__Register_Meta', 'venue_map')));
    /**
     * Register Meta: Venue Map Link
     *
     * @category Venues
     * @group tribe_event_venue
     */
    tribe_register_meta('tribe_event_venue_gmap_link', array('wrap' => array('before' => '', 'after' => '', 'label_before' => '', 'label_after' => '', 'meta_before' => '', 'meta_after' => ''), 'label' => '', 'filter_callback' => 'tribe_get_map_link_html'));
}
开发者ID:hubbardsc,项目名称:field_day,代码行数:31,代码来源:meta_registration.php

示例10: tribe_events_recurrence_tooltip

 /**
  * show the recurring event info in a tooltip
  *
  * return the details of the start/end date/time
  *
  * @param int     $post_id
  *
  * @return string
  * @todo remove tribe_events_event_recurring_info_tooltip filter in 3.11
  */
 function tribe_events_recurrence_tooltip($post_id = null)
 {
     if (empty($post_id)) {
         $post_id = get_the_ID();
     }
     $tooltip = '';
     if (tribe_is_recurring_event($post_id)) {
         $tooltip .= '<div class="recurringinfo">';
         $tooltip .= '<div class="event-is-recurring">';
         $tooltip .= '<span class="tribe-events-divider">|</span>';
         $tooltip .= sprintf(__('Recurring %s', 'tribe-events-calendar-pro'), tribe_get_event_label_singular());
         $tooltip .= sprintf(' <a href="%s">%s</a>', esc_url(tribe_all_occurences_link($post_id, false)), __('(See all)', 'tribe-events-calendar-pro'));
         $tooltip .= '<div id="tribe-events-tooltip-' . $post_id . '" class="tribe-events-tooltip recurring-info-tooltip">';
         $tooltip .= '<div class="tribe-events-event-body">';
         $tooltip .= tribe_get_recurrence_text($post_id);
         $tooltip .= '</div>';
         $tooltip .= '<span class="tribe-events-arrow"></span>';
         $tooltip .= '</div>';
         $tooltip .= '</div>';
         $tooltip .= '</div>';
     }
     if (has_filter('tribe_events_event_recurring_info_tooltip')) {
         _deprecated_function("The 'tribe_get_related_events' filter", '3.9', " the 'tribe_events_recurrence_tooltip' filter");
         $tooltip = apply_filters('tribe_events_event_recurring_info_tooltip', $tooltip);
         // for backwards-compat, will be removed
     }
     return apply_filters('tribe_events_recurrence_tooltip', $tooltip);
 }
开发者ID:simple-beck,项目名称:project-gc,代码行数:38,代码来源:general.php

示例11: initialize_filters

 public function initialize_filters()
 {
     static $initialized = false;
     if ($initialized) {
         return;
         // only run once
     }
     $initialized = true;
     new Tribe__Events__Filterbar__Filters__Category(sprintf(__('%s Category', 'tribe-events-filter-view'), tribe_get_event_label_singular()), 'eventcategory');
     new Tribe__Events__Filterbar__Filters__Cost(sprintf(__('Cost (%s)', 'tribe-events-filter-view'), tribe_get_option('defaultCurrencySymbol', '$')), 'cost');
     new Tribe__Events__Filterbar__Filters__Tag(__('Tags', 'tribe-events-filter-view'), 'tags');
     new Tribe__Events__Filterbar__Filters__Venue(tribe_get_venue_label_plural(), 'venues');
     new Tribe__Events__Filterbar__Filters__Organizer(tribe_get_organizer_label_plural(), 'organizers');
     new Tribe__Events__Filterbar__Filters__Day_Of_Week(__('Day', 'tribe-events-filter-view'), 'dayofweek');
     new Tribe__Events__Filterbar__Filters__Time_Of_Day(__('Time', 'tribe-events-filter-view'), 'timeofday');
     Tribe__Events__Filterbar__Additional_Fields__Manager::init();
     do_action('tribe_events_filters_create_filters');
 }
开发者ID:jamestrevorlees,项目名称:odd-web-v1.00,代码行数:18,代码来源:View.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


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