Пример #1
0
 /**
  * @static
  * @return Tribe__Events__Bar
  */
 public static function instance()
 {
     if (!isset(self::$instance)) {
         $className = __CLASS__;
         self::$instance = new $className();
     }
     return self::$instance;
 }
Пример #2
0
 /**
  * For default supported views, performs rendering and returns the result.
  */
 public function render_view()
 {
     /**
      * Fires before the embedded view is rendered.
      *
      * @param Tribe__Events__Pro__Shortcodes__Tribe_Events $shortcode
      */
     do_action('tribe_events_pro_tribe_events_shortcode_pre_render', $this);
     ob_start();
     $this->get_template_object()->add_input_hash();
     echo '<div id="tribe-events" class="' . $this->get_wrapper_classes() . '">';
     // Include the tribe bar HTML if required
     if ($this->is_attribute_truthy('tribe-bar', true)) {
         Tribe__Events__Bar::instance()->load_script();
         tribe_get_template_part('modules/bar');
     }
     tribe_get_view($this->get_template_object()->view_path);
     echo '</div>';
     $html = ob_get_clean();
     /**
      * Fires after the embedded view is rendered.
      *
      * @param Tribe__Events__Pro__Shortcodes__Tribe_Events $shortcode
      */
     do_action('tribe_events_pro_tribe_events_shortcode_post_render', $this);
     return $html;
 }