JezK
Edit File: render.php
<?php /** * Media Gallery Section — server-side render. * * Outputs a single wrapper div with data-attributes for the React * frontend to hydrate. No PHP-rendered HTML — React handles all output. * * Output is sanitised via wp_json_encode() + esc_attr(). * Image URL values are escaped on the React side via the view.js render. * * @package SectionCollection */ // Bail if accessed directly. if ( ! defined( 'ABSPATH' ) ) { exit; } $id = wp_unique_id( 'bpscMediaGallerySection-' ); ?> <div <?php echo wp_kses_data( get_block_wrapper_attributes() ); ?> id="<?php echo esc_attr( $id ); ?>" data-attributes="<?php echo esc_attr( wp_json_encode( $attributes ) ); ?>" ></div>