Files
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

29 lines
652 B
PHP

<?php
/*
* Maps
*/
function ubermenu_google_maps( $atts ){
extract(shortcode_atts(array(
'lat' => 0,
'lng' => 0,
'address' => '',
'zoom' => 15,
'title' => '',
'width' => '100%',
'height' => '200px'
), $atts));
$html = '
<div class="ubermenu-map-canvas" data-lat="'.$lat.'" data-lng="'.$lng.'" ';
if( !empty( $address ) ) $html.= 'data-address="'.$address.'" ';
$html.= 'data-zoom="'.$zoom.'" ';
if( !empty( $title ) ) $html.= 'data-maptitle="'.$title.'" ';
$html.= 'style="height:'.$height.'; width:'.$width.'"';
$html.= '></div>';
return $html;
}
add_shortcode( 'ubermenu-map' , 'ubermenu_google_maps' );