Skip to content
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

Register editor script/style with block instead of using enqueue_block_editor_assets #690

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

westonruter
Copy link
Owner

Fixes #689

Previously the plugin was enqueuing the editor script and style manually at the enqueue_block_editor_assets action. This broke as of Gutenberg 14.8 in which an editor-canvas iframe was introduced to encapsulate the edited blocks. The issue is fixed by registering the script and style via the editor_script_handles and editor_style_handles props of WP_Block_Type, respectively, which allows WordPress to know specifically which assets need to be enqueued in the editor-canvas.

@westonruter westonruter marked this pull request as ready for review March 2, 2023 01:08
@westonruter westonruter merged commit 21af0da into develop Mar 2, 2023
@westonruter westonruter deleted the fix/editor-asset-registration branch March 2, 2023 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated code when Gutenberg 15.1 is active
1 participant