Esempio n. 1
0
 /**
  * Return the single class instance
  *
  * @return object
  * @since 2.0.0
  */
 public static function instance()
 {
     if (is_null(self::$_instance)) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
 /**
  * Class constructor
  *
  * @uses add_action()
  * @uses add_filter()
  * @uses get_option()
  * @uses get_bloginfo()
  *
  * @global object $wp_embed
  * @since 2.0.0
  */
 protected function __construct()
 {
     // Include required files
     include_once plugin_dir_path(__FILE__) . 'includes/class-widget.php';
     // Include and instantiate admin class on admin pages
     if (is_admin()) {
         include_once plugin_dir_path(__FILE__) . 'includes/class-admin.php';
         self::$admin = Black_Studio_TinyMCE_Admin::instance();
         include_once plugin_dir_path(__FILE__) . 'includes/class-admin-pointer.php';
         self::$admin_pointer = Black_Studio_TinyMCE_Admin_Pointer::instance();
     } else {
         include_once plugin_dir_path(__FILE__) . 'includes/class-text-filters.php';
         self::$text_filters = Black_Studio_TinyMCE_Text_Filters::instance();
     }
     // Register action and filter hooks
     add_action('plugins_loaded', array($this, 'load_compatibility'), 50);
     add_action('widgets_init', array($this, 'widgets_init'));
 }