PluginProbe
Property Hive / 2.2.6
Property Hive v2.2.6
2.3.1 2.3.0 2.2.6 2.2.5 2.2.4 2.2.3 2.2.2 1.4.46 1.4.47 1.4.48 1.4.49 1.4.5 1.4.50 1.4.51 1.4.52 1.4.53 1.4.54 1.4.55 1.4.56 1.4.57 1.4.58 1.4.59 1.4.6 1.4.60 1.4.61 All 261 releases
propertyhive / includes / avada-widgets / property-street-view-shortcode.php

property-street-view-shortcode.php in Property Hive 2.2.6, at includes/avada-widgets/property-street-view-shortcode.php

39 lines 817 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 add_shortcode( 'avada_property_street_view', function( $atts ) {
4 $atts = shortcode_atts( array(
5 'height' => '',
6 ), $atts );
7
8 if ( get_post_type( get_the_ID() ) != 'property' )
9 {
10 return '';
11 }
12
13 fusion_element_rendering_elements( true );
14
15 global $property;
16
17 if ( empty($property) )
18 {
19 $property = new PH_Property(get_the_ID());
20 }
21
22 ob_start();
23
24 $attributes = array();
25 if ( isset($atts['height']) && $atts['height'] != '' )
26 {
27 $attributes['height'] = $atts['height'];
28 }
29
30 $attributes = apply_filters( 'propertyhive_avada_property_street_view_attributes', $attributes );
31
32 get_property_street_view($attributes);
33
34 $html = ob_get_clean();
35
36 fusion_element_rendering_elements( false );
37
38 return $html;
39 });