impress-org / givewp-next-gen

GiveWP 3.0.0 Feature Plugin
https://givewp.com/
GNU General Public License v3.0
10 stars 1 forks source link

Feature: Add missing block implementation #241

Closed jonwaldstein closed 1 year ago

jonwaldstein commented 1 year ago

Description

This implements the missing block when a previously registered block is not available.

The way this works is that when a block is missing, we replace it with the missing blockType and store the original block type json from the database in the missing blockType's originalContent attribute.

Then, when the block is found again as a registered block, we replace the missing block with the stored originalContent attribute.

Note: this is currently pulling in the WordPress core missing blockType to achieve this. After going through this, I think it might be better to supply our own version to prevent any conflicts in future WP versions.

Affects

Visuals

Screenshot 2023-08-01 at 2 58 49 PM

Testing Instructions

Pre-review Checklist


jonwaldstein commented 1 year ago

@kjohnson please review this when you get a chance.