diff --git a/templates/placeholders/locationmap.php b/templates/placeholders/locationmap.php
index 8ab6471..23ad8c9 100644
--- a/templates/placeholders/locationmap.php
+++ b/templates/placeholders/locationmap.php
@@ -7,30 +7,32 @@
* In this template, we encode the $args array into JSON for javascript to easily parse and request the locations from the server via AJAX.
*/
/* @var $EM_Location EM_Location */
- if ( get_option('dbem_gmap_is_active') && ( is_object($EM_Location) && $EM_Location->location_latitude != 0 && $EM_Location->location_longitude != 0 ) ) {
- //get dimensions with px or % added in
- $width = (!empty($args['width'])) ? $args['width']:get_option('dbem_map_default_width','400px');
- $width = preg_match('/(px)|%/', $width) ? $width:$width.'px';
- $height = (!empty($args['height'])) ? $args['height']:get_option('dbem_map_default_height','300px');
- $height = preg_match('/(px)|%/', $height) ? $height:$height.'px';
- //assign random number for element id reference
- $rand = substr(md5(rand().rand()),0,5);
- ?>
-
-
-
-
output(get_option('dbem_location_baloon_format')); ?>
-
-
-
- location_latitude; ?>
- location_longitude; ?>
-
- location_latitude == 0 && $EM_Location->location_longitude == 0 ){
- echo ''. __('Map Unavailable', 'dbem') .'';
- }
\ No newline at end of file
+ if ( get_option('dbem_gmap_is_active') ) {
+ if ( ( is_object($EM_Location) && ( $EM_Location->location_latitude != 0 || $EM_Location->location_longitude != 0 ) ) ) {
+ //get dimensions with px or % added in
+ $width = (!empty($args['width'])) ? $args['width']:get_option('dbem_map_default_width','400px');
+ $width = preg_match('/(px)|%/', $width) ? $width:$width.'px';
+ $height = (!empty($args['height'])) ? $args['height']:get_option('dbem_map_default_height','300px');
+ $height = preg_match('/(px)|%/', $height) ? $height:$height.'px';
+ //assign random number for element id reference
+ $rand = substr(md5(rand().rand()),0,5);
+ ?>
+
+
+
+
output(get_option('dbem_location_baloon_format')); ?>
+
+
+
+ location_latitude; ?>
+ location_longitude; ?>
+
+ '. __('Map Unavailable', 'dbem') .'';
+ }
+ }