AI
2 years ago
admin-pages
2 years ago
api
2 years ago
blog
3 years ago
customizer
2 years ago
filters
2 years ago
full-site-editing
2 years ago
importer
4 years ago
integrations
1 year ago
menu
3 years ago
polyfills
3 years ago
preview
2 years ago
shapes
2 years ago
shortcodes
1 year ago
src
1 year ago
add-edit-in-kubio.php
1 year ago
editor-assets.php
2 years ago
env.php
2 years ago
filters.php
2 years ago
frontend.php
4 years ago
global-data.php
2 years ago
init.php
2 years ago
kubio-block-library.php
2 years ago
kubio-editor.php
1 year ago
load.php
2 years ago
load.php
93 lines
| 1 | <?php |
| 2 | |
| 3 | /** base */ |
| 4 | |
| 5 | use Kubio\CLI\CLI; |
| 6 | use Kubio\Core\Activation; |
| 7 | use Kubio\Core\Deactivation; |
| 8 | |
| 9 | use Kubio\Core\License\License; |
| 10 | use Kubio\Core\License\Updater; |
| 11 | use Kubio\DemoSites\DemoSites; |
| 12 | use Kubio\GoogleFontsLocalLoader; |
| 13 | use Kubio\Migrations; |
| 14 | use Kubio\NotificationsManager; |
| 15 | |
| 16 | require_once __DIR__ . '/env.php'; |
| 17 | require_once __DIR__ . '/filters.php'; |
| 18 | require_once __DIR__ . '/preview/index.php'; |
| 19 | require_once __DIR__ . '/shortcodes/index.php'; |
| 20 | require_once __DIR__ . '/global-data.php'; |
| 21 | require_once __DIR__ . '/shapes/index.php'; |
| 22 | require_once __DIR__ . '/api/index.php'; |
| 23 | require_once __DIR__ . '/editor-assets.php'; |
| 24 | require_once __DIR__ . '/frontend.php'; |
| 25 | require_once __DIR__ . '/add-edit-in-kubio.php'; |
| 26 | require_once __DIR__ . '/kubio-block-library.php'; |
| 27 | require_once __DIR__ . '/kubio-editor.php'; |
| 28 | require_once __DIR__ . '/admin-pages/pages.php'; |
| 29 | require_once __DIR__ . '/menu/index.php'; |
| 30 | require_once __DIR__ . '/customizer/index.php'; |
| 31 | require_once KUBIO_BUILD_DIR . '/third-party-blocks/index.php'; |
| 32 | |
| 33 | /** full site editing */ |
| 34 | require_once __DIR__ . '/full-site-editing/default-template-types.php'; |
| 35 | require_once __DIR__ . '/full-site-editing/block-templates.php'; |
| 36 | require_once __DIR__ . '/full-site-editing/templates.php'; |
| 37 | require_once __DIR__ . '/full-site-editing/template-parts-area.php'; |
| 38 | require_once __DIR__ . '/full-site-editing/class-kubio-rest-template-part-controller.php'; |
| 39 | require_once __DIR__ . '/full-site-editing/class-kubio-rest-template-controller.php'; |
| 40 | require_once __DIR__ . '/full-site-editing/template-parts.php'; |
| 41 | require_once __DIR__ . '/full-site-editing/template-loader.php'; |
| 42 | require_once __DIR__ . '/full-site-editing/full-site-editing.php'; |
| 43 | require_once __DIR__ . '/full-site-editing/get-block-templates.php'; |
| 44 | require_once __DIR__ . '/AI/index.php'; |
| 45 | |
| 46 | |
| 47 | function kubio_load_integrations() { |
| 48 | $integrations_dir = __DIR__ . '/integrations'; |
| 49 | $integrations = array_diff( scandir( $integrations_dir ), array( '.', '..' ) ); |
| 50 | |
| 51 | foreach ( $integrations as $integration ) { |
| 52 | $integration_entry = "{$integrations_dir}/{$integration}/{$integration}.php"; |
| 53 | if ( file_exists( $integration_entry ) ) { |
| 54 | require_once $integration_entry; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | } |
| 59 | |
| 60 | function kubio_get_iframe_loader( $props = array() ) { |
| 61 | $params = array_merge( |
| 62 | array( |
| 63 | 'color' => '', |
| 64 | 'size' => '40px', |
| 65 | 'bg-color' => 'transparent', |
| 66 | 'message' => '', |
| 67 | ), |
| 68 | $props |
| 69 | ); |
| 70 | |
| 71 | foreach ( $params as $key => $value ) { |
| 72 | $params[ $key ] = urlencode( $value ); |
| 73 | } |
| 74 | |
| 75 | $url = add_query_arg( $params, kubio_url( '/static/kubio-iframe-loader.html' ) ); |
| 76 | |
| 77 | return sprintf( '<iframe style="border:none;pointer-events:none;user-select:none;display:block" allowtransparency="true" width="%2$s" height="%2$s" src="%1$s"></iframe>', $url, $params['size'] ); |
| 78 | } |
| 79 | |
| 80 | Updater::load( KUBIO_ENTRY_FILE ); |
| 81 | License::load( KUBIO_ROOT_DIR ); |
| 82 | |
| 83 | kubio_load_integrations(); |
| 84 | |
| 85 | Activation::load(); |
| 86 | Deactivation::load(); |
| 87 | DemoSites::load(); |
| 88 | NotificationsManager::load(); |
| 89 | GoogleFontsLocalLoader::registerFontResolver(); |
| 90 | Migrations::load(); |
| 91 | CLI::load(); |
| 92 | |
| 93 |