| @@ -12,38 +12,39 @@ | ||
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Logs class. |
| 15 | 15 | */ |
| 16 | -class MainWP_Includes { | |
| 16 | +class MainWP_Includes { // phpcs:ignore Generic.Classes.OpeningBraceSameLine.ContentAfterBrace -- NOSONAR. | |
| 17 | 17 | |
| 18 | - /** | |
| 19 | - * Public static variable to hold the plugin dir. | |
| 20 | - * | |
| 21 | - * @static | |
| 22 | - * | |
| 23 | - * @var string Default MainWP dashboard plugin dir. | |
| 24 | - */ | |
| 25 | - public static $plugin_basedir = MAINWP_PLUGIN_DIR; | |
| 26 | - /** | |
| 27 | - * Load required files and hooks to make the CLI work. | |
| 28 | - */ | |
| 29 | - public function __construct() { | |
| 30 | - $this->includes(); | |
| 31 | - } | |
| 18 | + /** | |
| 19 | + * Public static variable to hold the plugin dir. | |
| 20 | + * | |
| 21 | + * @static | |
| 22 | + * | |
| 23 | + * @var string Default MainWP dashboard plugin dir. | |
| 24 | + */ | |
| 25 | + public static $plugin_basedir = MAINWP_PLUGIN_DIR; | |
| 32 | 26 | |
| 27 | + /** | |
| 28 | + * Load required files and hooks to make the CLI work. | |
| 29 | + */ | |
| 30 | + public function __construct() { | |
| 31 | + // constructor. | |
| 32 | + } | |
| 33 | 33 | |
| 34 | - /** | |
| 35 | - * Check if enable log module. | |
| 36 | - */ | |
| 37 | - public static function is_enable_log_module() { | |
| 38 | - return defined( 'MAINWP_MODULE_LOG_ENABLED' ) && MAINWP_MODULE_LOG_ENABLED ? true : false; | |
| 39 | - } | |
| 40 | - | |
| 41 | - /** | |
| 42 | - * Load files. | |
| 43 | - */ | |
| 44 | - private function includes() { | |
| 45 | - if ( file_exists( self::$plugin_basedir . '/modules/class-module-log.php' ) ) { | |
| 46 | - require_once self::$plugin_basedir . '/modules/class-module-log.php'; | |
| 47 | - } | |
| 48 | - } | |
| 34 | + /** | |
| 35 | + * Load files. | |
| 36 | + */ | |
| 37 | + public function includes() { | |
| 38 | + require_once static::$plugin_basedir . 'includes/class-mainwp-setup.php'; // NOSONAR - WP compatible. | |
| 39 | + require_once static::$plugin_basedir . 'includes/class-mainwp-datetime.php'; // NOSONAR - WP compatible. | |
| 40 | + if ( file_exists( static::$plugin_basedir . 'modules/common/class-module-log.php' ) ) { | |
| 41 | + require_once static::$plugin_basedir . 'modules/common/class-module-log.php'; // NOSONAR - WP compatible. | |
| 42 | + } | |
| 43 | + if ( file_exists( static::$plugin_basedir . 'modules/common/class-module-cost-tracker.php' ) ) { | |
| 44 | + require_once static::$plugin_basedir . 'modules/common/class-module-cost-tracker.php'; // NOSONAR - WP compatible. | |
| 45 | + } | |
| 46 | + if ( file_exists( static::$plugin_basedir . 'modules/common/class-module-api-backups.php' ) ) { | |
| 47 | + require_once static::$plugin_basedir . 'modules/common/class-module-api-backups.php'; // NOSONAR - WP compatible. | |
| 48 | + } | |
| 49 | + } | |
| 49 | 50 | } |