public static function launch($options)
 {
     self::$options = $options;
     add_filter('comments_template', array(__CLASS__, 'filter_comments_template'), 20);
     add_filter('comments_number', array(__CLASS__, 'filter_comments_number'), 20);
     add_action('wp_footer', array(__CLASS__, 'action_wp_footer'));
 }
 protected function __construct()
 {
     $this->options = SpotIM_Options::get_instance();
     if (is_admin()) {
         // Launch Admin Page
         SpotIM_Admin::launch($this->options);
     } else {
         // Launch frontend code: embed script, comments template, comments count.
         SpotIM_Frontend::launch($this->options);
     }
 }
 private function dependencies()
 {
     $this->admin = new SpotIM_Admin();
     $this->api = new SpotIM_API_Dispatcher();
     // setup AJAX
     $this->register_default_hooks();
     // setup front-end
     if (!is_admin()) {
         SpotIM_Frontend::setup();
     }
 }
 protected function __construct()
 {
     $this->admin = new SpotIM_Admin();
     $this->api = new SpotIM_API_Dispatcher();
     // setup front-end
     if (!is_admin()) {
         SpotIM_Frontend::setup();
         $get = $_GET;
         if (isset($get['p']) && $get['p'] != '' && isset($get['json-comments'])) {
             $post_ids = (array) $get['p'];
             SpotIM_Export::generate_json_by_post($post_ids);
         }
     }
 }