/**
  * Create singleton, populate vars, and set WordPress hooks
  */
 public function __construct()
 {
     if (isset(self::$_single)) {
         return;
     }
     self::$_single = $this;
     self::$relative_path = '/../' . basename(__DIR__);
     if (is_admin()) {
         add_filter('show_advanced_plugins', [$this, 'showInAdmin'], 0, 2);
     }
     $this->loadPlugins();
 }
 public function __construct()
 {
     if (isset(self::$_single)) {
         return;
     }
     self::$_single = $this;
     // Singleton set.
     self::$relative_path = '/../' . basename(__DIR__);
     // Rel path set.
     if (is_admin()) {
         add_filter('show_advanced_plugins', array($this, 'showInAdmin'), 0, 2);
         // Admin only filter.
     }
     $this->loadPlugins();
 }
Example #3
0
 function __construct()
 {
     if (isset(self::$_single)) {
         return;
     }
     self::$_single = $this;
     // Singleton set.
     self::$relative_path = '/../' . basename(__DIR__);
     // Rel path set.
     add_action('plugins_loaded', array($this, 'loadPlugins'), 0);
     // Always add filter to autoload.
     if (is_admin()) {
         add_filter('show_advanced_plugins', array($this, 'showInAdmin'), 0, 2);
         // Admin only filter.
     }
 }