PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.7
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.7
2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.43 2.0.42 2.0.41 2.0.40 2.0.39 2.0.38 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.5.1 1.5.2 1.5.3 1.5.4 All 107 releases
b-blocks / build / key-takeaways / render.php

render.php in bBlocks – Essential Gutenberg Blocks & Patterns Collection 2.1.7, at build/key-takeaways/render.php

21 lines 763 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Key Takeaways Block — server-side render.
4 *
5 * Emits only a wrapper carrying the block attributes as a JSON data-attribute.
6 * view.js hydrates it on the frontend with React (Components/Frontend/KeyTakeaways)
7 * and injects per-instance dynamic CSS (Components/Common/Style).
8 *
9 * @package bBlocks
10 */
11
12 $id = wp_unique_id( 'bBlocksKeyTakeaways-' );
13 $planClass = BBlocks\Inc\Utils::isPro() ? 'pro' : 'free';
14 ?>
15 <div
16 <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_block_wrapper_attributes() is properly escaped ?>
17 <?php echo get_block_wrapper_attributes( [ 'class' => $planClass ] ); ?>
18 id='<?php echo esc_attr( $id ); ?>'
19 data-attributes='<?php echo esc_attr( wp_json_encode( $attributes ) ); ?>'
20 ></div>
21