| @@ -43,22 +43,22 @@ | ||
| 43 | 43 | Runtime::get_instance()->print_windpress_metadata(); |
| 44 | 44 | Runtime::get_instance()->enqueue_play_cdn(); |
| 45 | 45 | if (strpos($_SERVER['REQUEST_URI'], 'site-editor.php') !== \false) { |
| 46 | 46 | // handle the canvas |
| 47 | - Vite::assets()->enqueue('assets/integration/gutenberg/site-editor.js', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-site-editor', 'in_footer' => \true]); | |
| 47 | + Vite::assets()->enqueue('resources/integration/gutenberg/site-editor.js', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-site-editor', 'in_footer' => \true]); | |
| 48 | 48 | } else { |
| 49 | 49 | // handle the canvas |
| 50 | - Vite::assets()->enqueue('assets/integration/gutenberg/post-editor.js', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-post-editor', 'in_footer' => \true]); | |
| 50 | + Vite::assets()->enqueue('resources/integration/gutenberg/post-editor.js', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-post-editor', 'in_footer' => \true]); | |
| 51 | 51 | } |
| 52 | 52 | $handle = WIND_PRESS::WP_OPTION . ':integration-gutenberg-block-editor'; |
| 53 | - Vite::assets()->enqueue('assets/integration/gutenberg/block-editor.jsx', ['handle' => $handle, 'in_footer' => \true, 'dependencies' => ['wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-hooks', 'wp-i18n', 'react', 'react-dom']]); | |
| 53 | + Vite::assets()->enqueue('resources/integration/gutenberg/block-editor.jsx', ['handle' => $handle, 'in_footer' => \true, 'dependencies' => ['wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-hooks', 'wp-i18n', 'react', 'react-dom', 'react-jsx-runtime']]); | |
| 54 | 54 | // Enqueue Common Block if enabled |
| 55 | 55 | if (Config::get('integration.gutenberg.settings.common_block', \true)) { |
| 56 | - Vite::assets()->enqueue('assets/integration/gutenberg/common-block/index.jsx', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-common-block', 'in_footer' => \true, 'dependencies' => ['wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-block-editor', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-data', 'react', 'react-dom', $handle]]); | |
| 56 | + Vite::assets()->enqueue('resources/integration/gutenberg/common-block/index.jsx', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-common-block', 'in_footer' => \true, 'dependencies' => ['wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-block-editor', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-data', 'react', 'react-dom', 'react-jsx-runtime', $handle]]); | |
| 57 | 57 | } |
| 58 | 58 | // Enqueue Generate Cache module if enabled |
| 59 | 59 | if (Config::get('integration.gutenberg.modules.generate_cache', \true)) { |
| 60 | - Vite::assets()->enqueue('assets/integration/gutenberg/modules/generate-cache/main.ts', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-generate-cache', 'in_footer' => \true, 'dependencies' => ['wp-data', 'wp-preferences', 'wp-components', 'wp-i18n', 'wp-plugins', 'wp-editor', 'wp-element', 'react', 'react-dom', $handle]]); | |
| 60 | + Vite::assets()->enqueue('resources/integration/gutenberg/modules/generate-cache/main.ts', ['handle' => WIND_PRESS::WP_OPTION . ':integration-gutenberg-generate-cache', 'in_footer' => \true, 'dependencies' => ['wp-data', 'wp-preferences', 'wp-components', 'wp-i18n', 'wp-plugins', 'wp-editor', 'wp-element', 'react', 'react-dom', 'react-jsx-runtime', $handle]]); | |
| 61 | 61 | } |
| 62 | 62 | wp_add_inline_script($handle, <<<JS |
| 63 | 63 | // add __windpress__disable_playObserver to window if not exists |
| 64 | 64 | if (typeof window.__windpress__disable_playObserver === 'undefined') { |