| 1 |
<?php |
| 2 |
/** |
| 3 |
* File responsible for sdk files loading. |
| 4 |
* |
| 5 |
* @package ThemeIsleSDK |
| 6 |
* @copyright Copyright (c) 2017, Marius Cristea |
| 7 |
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 8 |
* @since 1.1.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
namespace ThemeisleSDK; |
| 12 |
|
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
exit; |
| 15 |
} |
| 16 |
$products = apply_filters( 'themeisle_sdk_products', array() ); |
| 17 |
$themeisle_library_path = dirname( __FILE__ ); |
| 18 |
$files_to_load = [ |
| 19 |
$themeisle_library_path . '/src/Loader.php', |
| 20 |
$themeisle_library_path . '/src/Product.php', |
| 21 |
|
| 22 |
$themeisle_library_path . '/src/Common/Abstract_module.php', |
| 23 |
$themeisle_library_path . '/src/Common/Module_factory.php', |
| 24 |
|
| 25 |
$themeisle_library_path . '/src/Modules/Dashboard_widget.php', |
| 26 |
$themeisle_library_path . '/src/Modules/Rollback.php', |
| 27 |
$themeisle_library_path . '/src/Modules/Uninstall_feedback.php', |
| 28 |
$themeisle_library_path . '/src/Modules/Licenser.php', |
| 29 |
$themeisle_library_path . '/src/Modules/Endpoint.php', |
| 30 |
$themeisle_library_path . '/src/Modules/Notification.php', |
| 31 |
$themeisle_library_path . '/src/Modules/Logger.php', |
| 32 |
$themeisle_library_path . '/src/Modules/Translate.php', |
| 33 |
$themeisle_library_path . '/src/Modules/Review.php', |
| 34 |
$themeisle_library_path . '/src/Modules/Recommendation.php', |
| 35 |
$themeisle_library_path . '/src/Modules/Promotions.php', |
| 36 |
$themeisle_library_path . '/src/Modules/Welcome.php', |
| 37 |
$themeisle_library_path . '/src/Modules/Compatibilities.php', |
| 38 |
$themeisle_library_path . '/src/Modules/About_us.php', |
| 39 |
]; |
| 40 |
|
| 41 |
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) ); |
| 42 |
|
| 43 |
foreach ( $files_to_load as $file ) { |
| 44 |
if ( is_file( $file ) ) { |
| 45 |
require_once $file; |
| 46 |
} |
| 47 |
} |
| 48 |
Loader::init(); |
| 49 |
|
| 50 |
foreach ( $products as $product ) { |
| 51 |
Loader::add_product( $product ); |
| 52 |
} |
| 53 |
|