function widget($args, $instance) { 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); $tax_query = TribeEventsMiniCalendar::instance()->get_tax_query_from_widget_options(json_decode($instance['filters']), $instance['operand']); echo $instance['title'] ? $args['before_title'] . $instance['title'] . $args['after_title'] : ''; $instance['tax_query'] = $tax_query; TribeEventsMiniCalendar::instance()->do_calendar($instance); echo $args['after_widget']; remove_filter('tribe_events_list_show_ical_link', '__return_false'); }
function widget($args, $instance) { $ecp = TribeEventsPro::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); $tax_query = TribeEventsMiniCalendar::instance()->get_tax_query_from_widget_options(json_decode($instance['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; TribeEventsMiniCalendar::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(); } }
/** * Get (and instantiate, if necessary) the instance of the class * * @static * @return TribeEventsMiniCalendar */ public static function instance() { if (!is_a(self::$instance, __CLASS__)) { self::$instance = new self(); } return self::$instance; }
/** * The class init function. * * @return void * @since 2.0 */ public function init() { // if pro rewrite rules have not been generated yet, flush them. (This can happen on reactivations.) if (is_array(get_option('rewrite_rules')) && !array_key_exists(trailingslashit(TribeEvents::instance()->rewriteSlug) . $this->weekSlug . '/?$', get_option('rewrite_rules'))) { TribeEvents::flushRewriteRules(); } TribeEventsMiniCalendar::instance(); TribeEventsCustomMeta::init(); TribeEventsRecurrenceMeta::init(); TribeEventsGeoLoc::instance(); $this->displayMetaboxCustomFields(); }
/** * The class init function. * * @return void * @since 2.0 */ public function init() { TribeEventsMiniCalendar::instance(); TribeEventsCustomMeta::init(); TribeEventsRecurrenceMeta::init(); TribeEventsGeoLoc::instance(); $this->displayMetaboxCustomFields(); }
/** * The class init function. * * @return void * @since 2.0 */ public function init() { TribeEventsMiniCalendar::instance(); TribeEventsCustomMeta::init(); TribeEventsRecurrenceMeta::init(); TribeEventsGeoLoc::instance(); $this->displayMetaboxCustomFields(); $this->single_event_meta = new TribeEventsPro_SingleEventMeta(); }
/** * Return arguments passed to mini calendar widget * * @return array * @author Jessica Yazbek **/ function tribe_events_get_mini_calendar_args() { return apply_filters('tribe_events_get_mini_calendar_args', TribeEventsMiniCalendar::instance()->get_args()); }
/** * The class init function. * * @return void */ public function init() { TribeEventsMiniCalendar::instance(); TribeEventsCustomMeta::init(); TribeEventsRecurrenceMeta::init(); TribeEventsGeoLoc::instance(); $this->displayMetaboxCustomFields(); $this->single_event_meta = new TribeEventsPro_SingleEventMeta(); $this->embedded_maps = new TribeEventsPro_EmbeddedMaps(); $this->mini_calendar_shortcode = new Tribe__Events__Pro__Mini_Calendar_Shortcode(); }