pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 265 forks source link

Update Pods Blocks to v3 #7239

Open JoryHogeveen opened 6 months ago

JoryHogeveen commented 6 months ago

Description

Problem: https://wordpress.org/support/topic/wordpress-editor-background-grey-if-plugin-not-enabled/ Cause: https://wordpress.org/support/topic/editor-canvas-iframe-vs-div/

If all registered blocks are at API version 3, the canvas uses an iframe. If not, it uses a div.

Basically, our blocks need to be updated to the new v3 blocks to support an iFrame.

Docs: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/

Version

3.0.10

Testing Instructions

  1. Go to block editor
  2. See it's canvas is an iframe element
  3. Enable Pods
  4. Go to block editor
  5. Not an iframe anymore :(
JoryHogeveen commented 6 months ago

Tagged for 3.1 instead of an MR since it probably breaks compatibility with older WP versions.