public function __construct() { if (isset(self::$_single)) { return; } self::$_single = $this; // Singleton set. /* * Load translations */ add_action('plugins_loaded', array($this, 'loadTextdomain')); /* * It is important to load plugins in init hook so that themes and plugins can override the functionality * Use smaller priority so that all plugins and themes are run first. */ add_action('init', array($this, 'loadAllModules'), 20); }
public function __construct() { if (isset(self::$_single)) { return; } self::$_single = $this; // Singleton set. /* * Load translations */ add_action('plugins_loaded', array($this, 'loadTextdomain')); /* * Register early on the direct download add_action as it must trigger * before anything is sent to the output buffer. */ add_action('plugins_loaded', array($this, 'enable_direct_download')); /* * It is important to load plugins in init hook so that themes and plugins can override the functionality * Use smaller priority so that all plugins and themes are run first. */ add_action('init', array($this, 'loadAllModules'), 20); }