PluginProbe
wpForo Forum / 3.2.0
wpForo Forum v3.2.0
3.2.0 3.1.7 3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 All 140 releases
wpforo / modules / license / bootstrap.php

bootstrap.php in wpForo Forum 3.2.0, at modules/license/bootstrap.php

33 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Submodule Loader and Initializer
4 */
5
6 use gVectors\License\LicenseModule;
7 use wpforo\modules\license\LicenseConfig;
8
9 // 1. Try to load the autoloader if the class isn't available yet
10 if( ! class_exists( LicenseModule::class ) ) {
11 $autoloader = __DIR__ . '/../../admin/pages/license/vendor/autoload.php';
12
13 if( file_exists( $autoloader ) ) {
14 require_once $autoloader;
15 }
16 }
17
18 // 2. Safely instantiate the module only if both classes exist
19 if( class_exists( LicenseModule::class ) && class_exists( LicenseConfig::class ) ) {
20 new LicenseModule(
21 new LicenseConfig(
22 WPFORO_VERSION,
23 WPFORO_BASEFOLDER,
24 WPFORO_URL . '/admin/pages/license',
25 'wpforo-addons',
26 'wpforo_admin_base_menu'
27 )
28 );
29 } else {
30 // Logs a message to your server's debug.log if the files are missing
31 error_log( 'wpForo License Error: The admin/pages/license submodule files are missing. Please clone the project recursively using: git clone --recurse-submodules <repository_url>' );
32 }
33