borlabs

Shortcode

Sep 2nd, 2021 (edited)
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.36 KB | None | 0 0
  1. <?php
  2. // Start buffer
  3. ob_start();
  4. ?>
  5. <!-- Location -->
  6. <div id="listing-location" class="listing-section">
  7.     <h3 class="listing-desc-headline margin-top-60 margin-bottom-30"><?php esc_html_e('Location','listeo_core'); ?></h3>
  8.  
  9.     <div id="singleListingMap-container" class="<?php if($disable_address) { echo 'circle-point'; } ?> " >
  10.         <div id="singleListingMap" data-latitude="<?php echo esc_attr($latitude); ?>" data-longitude="<?php echo esc_attr($longitude); ?>" data-map-icon="<?php echo esc_attr($icon); ?>" <?php if(isset($icon_svg)) { ?> data-map-icon-svg="<?php echo esc_attr($icon_svg); ?>"<?php } ?>></div>
  11.         <?php if(get_option('listeo_map_provider') == 'google_not_valid_anymore') { ?><a href="#" id="streetView"><?php esc_html_e('Street View','listeo_core'); ?></a> <?php } ?>
  12.         <?php if(!$disable_address) { ?>
  13.         <a target="_blank" href="https://www.google.com/maps/dir/?api=1&destination=<?php echo esc_attr($latitude.','.$longitude); ?>" id="getDirection"><?php esc_html_e('Get Direction','listeo_core'); ?></a>
  14.         <?php }?>
  15.     </div>
  16.  
  17. </div>
  18. <?php
  19. // Get buffer
  20. $htmlLocationCode = ob_get_contents();
  21. // End buffer
  22. ob_end_clean();
  23. // Output blocked code and Content Blocker preview
  24. echo do_shortcode('[borlabs-cookie type="content-blocker" id="googlemaps" title="Google Maps"]' . $htmlLocationCode . '[/borlabs-cookie]');
Add Comment
Please, Sign In to add comment