PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / trunk
bBlocks – Essential Gutenberg Blocks & Patterns Collection vtrunk
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 1.5.5 All 106 releases
b-blocks / build / expand-content / render.php

render.php in bBlocks – Essential Gutenberg Blocks & Patterns Collection trunk, at build/expand-content/render.php

25 lines 963 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Expand Content block server-side render.
4 *
5 * Follows the data-table convention: the wrapper only carries the block id and
6 * a JSON snapshot of the attributes. view.js mounts a React root on the wrapper
7 * and the Frontend component (ExpandContent.js) moves the InnerBlocks content
8 * ($content) out of the template container into its own tree.
9 *
10 * @package bBlocks
11 */
12
13 $id = wp_unique_id( 'bBlocksExpandContent-' );
14 ?>
15
16 <div <?php echo get_block_wrapper_attributes(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_block_wrapper_attributes() is properly escaped. ?> id='<?php echo esc_attr( $id ); ?>' data-attributes='<?php echo esc_attr( wp_json_encode( $attributes ) ); ?>'>
17
18 <div class="b-blocks-expand-content-innerBlocks-contents">
19 <?php
20 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- $content is rendered InnerBlocks output already escaped by core.
21 echo $content;
22 ?>
23 </div>
24 </div>
25