PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | includes/classes/block-base-abstract.php +4 -1 2.11.1 → 2.14.0 View file →
@@ -152,9 +152,12 @@
152 152 if ( ! $content || $this->is_skip_inner_block ) {
153 153 // When called from the editor's ServerSideRender (REST API), RenderContainer (JS) already
154 154 // provides the outer ablocks-block-{blockId} wrapper via useBlockProps. Including it here
155 155 // too causes the Advanced-settings CSS selector to match two elements → double border/padding.
156 - if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
156 + // Only that preview render (it always sends context=edit): front-end REST endpoints such as the
157 + // loop filter re-render blocks into the page, where the wrapper and its scoped styles are needed.
158 + // phpcs:ignore WordPress.Security.NonceVerification.Recommended
159 + if ( defined( 'REST_REQUEST' ) && REST_REQUEST && 'edit' === ( $_REQUEST['context'] ?? '' ) ) {
157 160 ob_start();
158 161 echo $this->render_block_content( $attributes, $content, $block_instance );
159 162 $content = ob_get_clean();
160 163 } else {