-
Notifications
You must be signed in to change notification settings - Fork 849
Forms: fix block styles not loading in CIAB environment. #46643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: minor | ||
| Type: fixed | ||
|
|
||
| Forms: fix block styles not loading in CIAB environment. |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -52,6 +52,9 @@ | |||
| add_filter( 'pre_render_block', array( __CLASS__, 'pre_render_contact_form' ), 10, 3 ); | ||||
|
|
||||
| add_filter( 'block_editor_rest_api_preload_paths', array( __CLASS__, 'preload_endpoints' ) ); | ||||
|
|
||||
| // Load scripts for the editing interface | ||||
| add_action( 'enqueue_block_editor_assets', array( __CLASS__, 'load_editor_scripts' ), 9 ); | ||||
| } | ||||
| /** | ||||
| * Register the contact form block feature flag. | ||||
|
|
@@ -826,22 +829,11 @@ | |||
|
|
||||
| /** | ||||
| * Load editor styles for the block. | ||||
| * These are loaded via enqueue_block_assets to ensure proper loading in the editor iframe context. | ||||
| * | ||||
| * @deprecated $$next-version$$ This function is deprecated and will be removed in a future version. | ||||
| */ | ||||
| public static function load_editor_styles() { | ||||
|
|
||||
| $handle = 'jp-forms-blocks'; | ||||
|
|
||||
| Assets::register_script( | ||||
| $handle, | ||||
| '../../../dist/blocks/editor.js', | ||||
| __FILE__, | ||||
| array( | ||||
| 'css_path' => '../../../dist/blocks/editor.css', | ||||
| 'textdomain' => 'jetpack-forms', | ||||
| ) | ||||
| ); | ||||
| wp_enqueue_style( 'jp-forms-blocks' ); | ||||
| _deprecated_function( __METHOD__, 'jetpack-15.5', null ); | ||||
|
Check failure on line 836 in projects/packages/forms/src/blocks/contact-form/class-contact-form-block.php
|
||||
| } | ||||
|
|
||||
| /** | ||||
|
|
@@ -856,6 +848,8 @@ | |||
|
|
||||
| $handle = 'jp-forms-blocks'; | ||||
|
|
||||
| wp_enqueue_style( 'jp-forms-blocks' ); | ||||
|
|
||||
|
Comment on lines
+851
to
+852
|
||||
| wp_enqueue_style( 'jp-forms-blocks' ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: other | ||
|
|
||
| Forms: fix block styles not loading in CIAB environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a public function I think we should add a deprecation notice before removing it.
Since it could cause fatal errors or any plugin that also calls it.