/** * Display latitude and longitude on listing edit page below address field * * Echos html content to be displayed after location attribute on property edit page * * @since 1.0 * @uses WPP_F::get_coordinates() Creates an array from string $args. * * @param string $listing_id Listing ID must be passed */ function wpp_show_coords($listing_id = false) { if (!$listing_id) { return; } // If latitude and logitude meta isn't set, returns false $coords = WPP_F::get_coordinates($listing_id); echo "<span class='description'>"; if ($coords) { _e("Address was validated by Google Maps.", ud_get_wp_property()->domain); } else { _e("Address has not yet been validated, should be formatted as: street, city, state, postal code, country. Locations are validated through Google Maps.", ud_get_wp_property()->domain); } echo "</span>"; }
echo $meta_title; ?> </h2> <p><?php echo do_shortcode(html_entity_decode($post->{$meta_slug})); ?> </p> <?php } ?> <?php } ?> <?php if (WPP_F::get_coordinates()) { ?> <div id="property_map" class="<?php wpp_css('property::property_map'); ?> " style="width:100%; height:450px"></div> <?php } ?> <?php if ($post->post_parent) { ?> <a href="<?php echo $post->parent_link; ?>
<?php /** * [property_map] template * * To modify it, copy it to your theme's root. */ global $wp_properties; if (!($coords = \WPP_F::get_coordinates($property['ID']))) { return; } $unique_id = 'property_map_' . rand(10000, 99999); ?> <div class="<?php wpp_css('property_map::wrapper', "property_map_wrapper"); ?> "> <div id="<?php echo $unique_id; ?> " class="<?php wpp_css('property_map::dom_id'); ?> " style="width:<?php echo $data['width']; ?> ; height:<?php echo $data['height']; ?> "></div> </div>