handling anchor for google-map block
This commit is contained in:
parent
9a354713c2
commit
45f02d4758
|
|
@ -7,6 +7,9 @@
|
|||
"foreground": "#DF1E1E",
|
||||
"src": "location-alt"
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true
|
||||
},
|
||||
"keywords": [
|
||||
"Carte",
|
||||
"google",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
|
||||
$mapDatas = get_field('map_datas');
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
|
@ -123,7 +124,7 @@ $mapDatas = get_field('map_datas');
|
|||
})(jQuery);
|
||||
</script>
|
||||
|
||||
<section class="homegrade-blocks-google-map">
|
||||
<section id="<?php echo $block['anchor'] ?>" <?php echo get_block_wrapper_attributes(['class' => 'homegrade-blocks-google-map']); ?>>
|
||||
<?php if ($mapDatas) : ?>
|
||||
<div class="map_frame acf-map" data-zoom="16">
|
||||
<div class="marker" data-lat="<?php echo esc_attr($mapDatas['lat']); ?>" data-lng="<?php echo esc_attr($mapDatas['lng']); ?>"></div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user