| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 4 |
|
| 5 |
extract(shortcode_atts(array( |
| 6 |
'height' => '400', |
| 7 |
'zoom' => '14', |
| 8 |
'scrollwheel' => 'true', |
| 9 |
), $atts)); |
| 10 |
|
| 11 |
global $property; |
| 12 |
|
| 13 |
if ( !isset($property->id) ) { |
| 14 |
return; |
| 15 |
} |
| 16 |
|
| 17 |
$attributes = array(); |
| 18 |
if ( isset($atts['height']) && $atts['height'] != '' ) |
| 19 |
{ |
| 20 |
$attributes['height'] = $atts['height']; |
| 21 |
} |
| 22 |
if ( isset($atts['zoom']) && isset($atts['zoom']['size']) && $atts['zoom']['size'] != '' ) |
| 23 |
{ |
| 24 |
$attributes['zoom'] = $atts['zoom']['size']; |
| 25 |
} |
| 26 |
if ( isset($atts['scrollwheel']) && $atts['scrollwheel'] != '' ) |
| 27 |
{ |
| 28 |
$attributes['scrollwheel'] = $atts['scrollwheel']; |
| 29 |
} |
| 30 |
|
| 31 |
get_property_map($attributes); |