| @@ -1,17 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | -/** | |
| 3 | - * Stat Cards 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/StatCards) | |
| 7 | - * and injects per-instance dynamic CSS (Components/Common/Style). | |
| 8 | - * | |
| 9 | - * @package bBlocks | |
| 10 | - */ | |
| 11 | - | |
| 12 | 2 | $id = wp_unique_id( 'bBlocksStatCards-' ); |
| 13 | 3 | $planClass = BBlocks\Inc\Utils::isPro() ? 'pro' : 'free'; |
| 4 | +$attributes = BBlocks\Inc\Sanitize::attributes( $attributes ); | |
| 14 | 5 | ?> |
| 15 | 6 | <div |
| 16 | 7 | <?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- get_block_wrapper_attributes() is properly escaped ?> |
| 17 | 8 | <?php echo get_block_wrapper_attributes( [ 'class' => $planClass ] ); ?> |