| @@ -147,13 +147,16 @@ | ||
| 147 | 147 | /** |
| 148 | 148 | * Register and localize the Gutenberg scripts. |
| 149 | 149 | */ |
| 150 | 150 | public static function localize_gutenberg() { |
| 151 | - $portal_id = Portal_Options::get_portal_id(); | |
| 152 | 151 | $embed_domain = Filters::apply_js_base_url_filters(); |
| 153 | 152 | wp_enqueue_script( self::APP_EMBEDDER, "$embed_domain/integrated-app-embedder/v1.js", array(), LEADIN_PLUGIN_VERSION, true ); |
| 154 | 153 | self::enqueue_forms_script(); |
| 155 | - self::enqueue_form_v4_script( $portal_id ); | |
| 154 | + // The v4 forms embed script is intentionally not enqueued here: in the | |
| 155 | + // WP 6.3+ iframed editor the block renders `.hs-form-frame` inside the | |
| 156 | + // canvas iframe, so PreviewForm injects the embed script into that | |
| 157 | + // iframe instead. A top-frame copy would pre-empt the iframe copy's | |
| 158 | + // init guard and leave the preview blank. | |
| 156 | 159 | self::enqueue_meetings_script(); |
| 157 | 160 | wp_register_style( self::GUTENBERG, LEADIN_JS_BASE_PATH . '/gutenberg.css', array(), LEADIN_PLUGIN_VERSION ); |
| 158 | 161 | wp_enqueue_style( self::GUTENBERG ); |
| 159 | 162 | wp_register_script( self::GUTENBERG, LEADIN_JS_BASE_PATH . '/gutenberg.js', array( 'wp-blocks', 'wp-element', 'wp-i18n', self::APP_EMBEDDER, self::MEETINGS_SCRIPT, self::FORMS_SCRIPT ), LEADIN_PLUGIN_VERSION, true ); |