assets
5 months ago
src
1 month ago
LICENSE
6 months ago
composer.json
1 month ago
index.php
6 months ago
load.php
1 month ago
start.php
1 month ago
start.php
50 lines
| 1 | <?php |
| 2 | /** |
| 3 | * File responsible for sdk files loading. |
| 4 | * |
| 5 | * @package ThemeGrillSDK |
| 6 | * @copyright Copyright (c) 2025, ThemeGrill |
| 7 | * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License |
| 8 | * @since 1.0.0 |
| 9 | */ |
| 10 | |
| 11 | namespace ThemeGrillSDK; |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | $products = apply_filters( 'themegrill_sdk_products', [] ); |
| 18 | |
| 19 | $themegrill_library_path = __DIR__; |
| 20 | $files_to_load = [ |
| 21 | $themegrill_library_path . '/src/Loader.php', |
| 22 | $themegrill_library_path . '/src/Product.php', |
| 23 | |
| 24 | $themegrill_library_path . '/src/Common/AbstractModule.php', |
| 25 | $themegrill_library_path . '/src/Common/ModuleFactory.php', |
| 26 | |
| 27 | $themegrill_library_path . '/src/Modules/ScriptLoader.php', |
| 28 | $themegrill_library_path . '/src/Modules/Rollback.php', |
| 29 | $themegrill_library_path . '/src/Modules/UninstallFeedback.php', |
| 30 | $themegrill_library_path . '/src/Modules/Notification.php', |
| 31 | $themegrill_library_path . '/src/Modules/Logger.php', |
| 32 | $themegrill_library_path . '/src/Modules/Announcements.php', |
| 33 | |
| 34 | $themegrill_library_path . '/src/Modules/Licenser.php', |
| 35 | $themegrill_library_path . '/src/Modules/Updater.php', |
| 36 | ]; |
| 37 | |
| 38 | $files_to_load = array_merge( $files_to_load, apply_filters( 'themegrill_sdk_required_files', [] ) ); |
| 39 | |
| 40 | foreach ( $files_to_load as $file ) { |
| 41 | if ( is_file( $file ) ) { |
| 42 | require_once $file; |
| 43 | } |
| 44 | } |
| 45 | Loader::init(); |
| 46 | |
| 47 | foreach ( $products as $product ) { |
| 48 | Loader::add_product( $product ); |
| 49 | } |
| 50 |