-
-
Save oxyc/dc646e094e1096972f17422052e87a6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/pro/blocks.php b/pro/blocks.php | |
index 8f02e8d..4ac127b 100755 | |
--- a/pro/blocks.php | |
+++ b/pro/blocks.php | |
@@ -910,8 +910,14 @@ function acf_ajax_fetch_block() { | |
$content = ''; | |
$is_preview = true; | |
+ $parent = WP_Block_Supports::$block_to_render; | |
+ $block['blockName'] = $block['name']; | |
+ WP_Block_Supports::$block_to_render = $block; | |
+ | |
// Render and store HTML. | |
$response['preview'] = acf_rendered_block( $block, $content, $is_preview, $post_id, null, $context ); | |
+ | |
+ WP_Block_Supports::$block_to_render = $parent; | |
} | |
// Send response. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment