PluginProbe
bBlocks – Essential Gutenberg Blocks & Patterns Collection / 2.1.8
bBlocks – Essential Gutenberg Blocks & Patterns Collection v2.1.8
2.1.8 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 All 108 releases
← All changes | build/google-map/render.php +1 -14 2.1.2 → 2.1.8 View file →
@@ -1,24 +1,11 @@
1 1 <?php
2 -/**
3 - * Google Map block server-side render.
4 - *
5 - * Emits an empty wrapper carrying the block attributes; view.js hydrates it
6 - * with React (Components/Common/Style.js + Components/Frontend/GoogleMap.js).
7 - * The API key is injected here as a data attribute so it never lives in post
8 - * content, and a static address + deep link is printed inside the wrapper so
9 - * no-JS / no-key visitors still get something useful before hydration wipes it.
10 - *
11 - * @package bBlocks
12 - *
13 - * @var array $attributes Block attributes.
14 - */
15 2
16 3 $prefix = 'bBlocksGoogleMap';
17 4 $id = wp_unique_id( "$prefix-" );
18 5 $api_keys = get_option( 'bBlocksApiKeys', [] );
19 6 $planClass = BBlocks\Inc\Utils::isPro() ? 'pro' : 'free';
20 -
7 +$attributes = BBlocks\Inc\Sanitize::attributes( $attributes );
21 8 $source = isset( $attributes['source'] ) && is_array( $attributes['source'] ) ? $attributes['source'] : [];
22 9 $markers = isset( $attributes['markers'] ) && is_array( $attributes['markers'] ) ? $attributes['markers'] : [];
23 10 $caption = isset( $attributes['caption'] ) && is_array( $attributes['caption'] ) ? $attributes['caption'] : [];
24 11