-
Notifications
You must be signed in to change notification settings - Fork 3
fix: WordPress 6.8+ compatibility and iframe editor support #421
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: main
Are you sure you want to change the base?
Conversation
…onent. Remove deprecated addWonderBlocksButton function and streamline toolbar button rendering logic.
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.
Pull request overview
This PR updates the WonderBlocks plugin for WordPress 6.8+ compatibility and adds support for the iframe editor introduced in WordPress 6.3, addressing deprecation warnings and fixing critical compatibility issues.
- Updated WordPress component props to use new standardized sizes and spacing (
__next40pxDefaultSize,__nextHasNoMarginBottom) - Fixed block category registration order and CSS loading for iframe editor compatibility
- Refactored toolbar button logic into a dedicated component with improved iframe handling
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/wonder-blocks.js |
Reordered imports to register block category before blocks; refactored toolbar button to use new component; removed unused constants |
src/components/Modal/Sidebar/Categories.jsx |
Added __next40pxDefaultSize prop to SelectControl for WordPress 6.8+ compatibility |
src/components/Modal/Modal.jsx |
Updated data store selector from deprecated core/edit-site to core/editor |
src/components/Modal/Content/KeywordFilter.jsx |
Added __nextHasNoMarginBottom prop to SearchControl for updated margin behavior |
src/components/AddToolbarButton.jsx |
New component handling toolbar button addition with iframe editor support and retry logic |
src/blocks/inspector-control.js |
Added __next40pxDefaultSize to SelectControl instances; removed deprecated theme color UI |
src/blocks/block.json |
Updated apiVersion to 3 for iframe compatibility; added style field for CSS loading |
includes/Library/Admin.php |
Changed hook from enqueue_block_editor_assets to enqueue_block_assets; added validation and duplicate registration checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Proposed changes
This PR updates the WonderBlocks plugin to be compatible with WordPress 6.8+ and ensures full support for the iframe editor introduced in WordPress 6.3. It addresses multiple deprecation warnings and fixes compatibility issues.
Changes
Deprecation Fixes
SelectControl: Added
__next40pxDefaultSizeprop to allSelectControlinstances to opt into the new 40px default size (replaces deprecated 36px)SearchControl: Added
__nextHasNoMarginBottomprop to opt into new margin stylesBlock API: Updated block
apiVersionfrom 2 to 3 for iframe editor compatibilityData Store: Replaced deprecated
select('core/edit-site').getEditedPostType()withselect('core/editor').getCurrentPostType()Iframe Editor Compatibility
Block Category Registration: Fixed import order to register category before block registration
register-categoryimport beforeblockimport inwonder-blocks.jsCSS Enqueuing: Fixed CSS loading for iframe editor
enqueue_block_assetshook inAdmin.phpto ensure styles load in both parent and iframestylefield toblock.jsonreferencing the registered style handleType of Change
Production
Development
Visual
Checklist
Further comments