Server : Apache System : Linux server.lienzindia.com 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 User : plutus ( 1007) PHP Version : 7.4.33 Disable Function : NONE Directory : /home/plutus/public_html/wp-content/plugins/ubermenu/pro/ |
Upload File : |
<?php /* * Maps */ function ubermenu_google_maps( $atts ){ //Enqueue the API // wp_enqueue_script( 'google-maps' ); ubermenu_enqueue_script( 'google-maps' ); 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' );