public function widget($args, $instance)
 {
     $ecp = Tribe__Events__Pro__Main::instance();
     $tooltip_status = $ecp->recurring_info_tooltip_status();
     $ecp->disable_recurring_info_tooltip();
     add_filter('tribe_events_list_show_ical_link', '__return_false');
     echo $args['before_widget'];
     $defaults = array('title' => __('Events Calendar', 'tribe-events-calendar-pro'), 'count' => 5, 'filters' => null, 'operand' => 'OR');
     $instance = wp_parse_args((array) $instance, $defaults);
     $filters = isset($instance['raw_filters']) ? $instance['raw_filters'] : json_decode($instance['filters']);
     $tax_query = Tribe__Events__Pro__Widgets::form_tax_query($filters, $instance['operand']);
     do_action('tribe_events_mini_cal_before_the_title');
     echo $instance['title'] ? $args['before_title'] . $instance['title'] . $args['after_title'] : '';
     do_action('tribe_events_mini_cal_after_the_title');
     $instance['tax_query'] = $tax_query;
     Tribe__Events__Pro__Mini_Calendar::instance()->do_calendar($instance);
     echo $args['after_widget'];
     remove_filter('tribe_events_list_show_ical_link', '__return_false');
     if ($tooltip_status) {
         $ecp->enable_recurring_info_tooltip();
     }
 }
예제 #2
0
 /**
  * The class init function.
  *
  * @return void
  */
 public function init()
 {
     Tribe__Events__Pro__Mini_Calendar::instance();
     Tribe__Events__Pro__Custom_Meta::init();
     Tribe__Events__Pro__Recurrence_Meta::init();
     Tribe__Events__Pro__Geo_Loc::instance();
     Tribe__Events__Pro__Community_Modifications::init();
     $this->displayMetaboxCustomFields();
     $this->single_event_meta = new Tribe__Events__Pro__Single_Event_Meta();
     $this->queue_processor = new Tribe__Events__Pro__Recurrence__Queue_Processor();
     $this->queue_realtime = new Tribe__Events__Pro__Recurrence__Queue_Realtime();
     $this->embedded_maps = new Tribe__Events__Pro__Embedded_Maps();
     $this->widget_wrappers = new Tribe__Events__Pro__Shortcodes__Widget_Wrappers();
     $this->singular_event_label = tribe_get_event_label_singular();
     $this->plural_event_label = tribe_get_event_label_plural();
 }
예제 #3
0
 /**
  * Get (and instantiate, if necessary) the instance of the class
  *
  * @static
  * @return Tribe__Events__Pro__Mini_Calendar
  */
 public static function instance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
예제 #4
0
/**
 * Return arguments passed to mini calendar widget
 *
 * @return array
 **/
function tribe_events_get_mini_calendar_args()
{
    return apply_filters('tribe_events_get_mini_calendar_args', Tribe__Events__Pro__Mini_Calendar::instance()->get_args());
}
예제 #5
0
파일: Main.php 프로젝트: TakenCdosG/chefs
 /**
  * The class init function.
  *
  * @return void
  */
 public function init()
 {
     Tribe__Events__Pro__Mini_Calendar::instance();
     Tribe__Events__Pro__This_Week::instance();
     Tribe__Events__Pro__Custom_Meta::init();
     Tribe__Events__Pro__Recurrence__Meta::init();
     Tribe__Events__Pro__Geo_Loc::instance();
     Tribe__Events__Pro__Community_Modifications::init();
     $this->displayMetaboxCustomFields();
     $this->custom_meta_tools = new Tribe__Events__Pro__Admin__Custom_Meta_Tools();
     $this->single_event_meta = new Tribe__Events__Pro__Single_Event_Meta();
     $this->single_event_overrides = new Tribe__Events__Pro__Recurrence__Single_Event_Overrides();
     $this->queue_processor = new Tribe__Events__Pro__Recurrence__Queue_Processor();
     $this->queue_realtime = new Tribe__Events__Pro__Recurrence__Queue_Realtime();
     $this->aggregator = new Tribe__Events__Pro__Recurrence__Aggregator();
     $this->embedded_maps = new Tribe__Events__Pro__Embedded_Maps();
     $this->shortcodes = new Tribe__Events__Pro__Shortcodes__Register();
     $this->singular_event_label = tribe_get_event_label_singular();
     $this->plural_event_label = tribe_get_event_label_plural();
     $this->singular_event_label_lowercase = tribe_get_event_label_singular_lowercase();
     $this->plural_event_label_lowercase = tribe_get_event_label_plural_lowercase();
 }