Ejemplo n.º 1
0
 function estetico_filter_the_content_properties($content)
 {
     global $post, $sitepress, $sidebar_name;
     $main_properties_page = estetico_get_setting('main_properties_page');
     if (isset($main_properties_page[0])) {
         $page_id = (int) $main_properties_page[0];
         $wpml_page_id = $post->ID;
         if (function_exists('icl_object_id')) {
             $default_language = $sitepress->get_default_language();
             $wpml_page_id = icl_object_id($post->ID, 'page', false, $default_language);
         }
         if ($page_id == $wpml_page_id) {
             $sidebar_name = 'properties';
             $properties_compontent_content = "";
             ob_start();
             estetico_load_component('properties', array('post' => $post));
             $properties_compontent_content = ob_get_contents();
             ob_end_clean();
             $content = $content . $properties_compontent_content;
         }
     }
     return $content;
 }
Ejemplo n.º 2
0
<?php

$propMgr = new PropertiesManager();
$properties = $propMgr->getProperties(null, null, 1000000);
$properties_map_index = 1;
?>

<div class="train-railing separator">
	<div class="railing"></div>
	<h3 class="train"><?php 
echo $title;
?>
</h3>
	<div class="railing"></div>
</div>

<?php 
estetico_load_component('common/properties_view_map', array('list_style' => 'map', 'properties' => $properties, 'properties_map_index' => $properties_map_index, 'options' => array('show_legend' => false, 'show_places' => false, 'show_fullscreen' => false)));
Ejemplo n.º 3
0
 function widget($args, $instance)
 {
     $price_min = PropertiesManager::getPriceMin();
     $price_max = PropertiesManager::getPriceMax();
     $types = PropertiesManager::getAllTypes();
     $types_selected = array();
     $types_filtered = array();
     $features = PropertiesManager::getAllFeatures();
     $features_selected = array();
     $features_filtered = array();
     if (isset($_GET['feature'])) {
         $features_selected = explode(',', $_GET['feature']);
     }
     $features_filtered = PropertiesManager::getFeaturesFiltered($_GET);
     if (isset($_GET['type'])) {
         $types_selected = explode(',', $_GET['type']);
     }
     $types_filtered = PropertiesManager::getTypesFiltered($_GET);
     if (isset($_GET['price'])) {
         $price = explode(',', $_GET['price']);
         $price_min_value = $price[0];
         $price_max_value = $price[1];
     } else {
         if (isset($_GET['min_price'])) {
             $price_min_value = $_GET['min_price'];
         } else {
             $price_min_value = $price_min;
         }
         if (isset($_GET['max_price'])) {
             $price_max_value = $_GET['max_price'];
         } else {
             $price_max_value = $price_max;
         }
     }
     $bedrooms_min = $bedrooms_min_value = 0;
     $bedrooms_max = $bedrooms_max_value = 20;
     if (isset($_GET['bedrooms'])) {
         if (strpos($_GET['bedrooms'], ',') !== false) {
             $bedrooms = explode(',', $_GET['bedrooms']);
             $bedrooms_min_value = $bedrooms[0];
             $bedrooms_max_value = $bedrooms[1];
         } else {
             $bedrooms_min_value = $_GET['bedrooms'];
         }
     }
     $bathrooms_min = $bathrooms_min_value = 0;
     $bathrooms_max = $bathrooms_max_value = 20;
     if (isset($_GET['bathrooms'])) {
         if (strpos($_GET['bathrooms'], ',') !== false) {
             $bathrooms = explode(',', $_GET['bathrooms']);
             $bathrooms_min_value = $bathrooms[0];
             $bathrooms_max_value = $bathrooms[1];
         } else {
             $bathrooms_min_value = $_GET['bathrooms'];
         }
     }
     $sq_feet_min = $sq_feet_min_value = 0;
     $sq_feet_max = $sq_feet_max_value = PropertiesManager::getSqFeetMax();
     if (isset($_GET['sq_feet'])) {
         if (strpos($_GET['sq_feet'], ',') !== false) {
             $sq_feet = explode(',', $_GET['sq_feet']);
             $sq_feet_min_value = $sq_feet[0];
             $sq_feet_max_value = $sq_feet[1];
         } else {
             $sq_feet_min_value = $_GET['sq_feet'];
         }
     }
     $year_built_min = $year_built_min_value = PropertiesManager::getYearBuiltMin();
     $year_built_max = $year_built_max_value = date('Y');
     if (isset($_GET['year_built'])) {
         $years = explode(',', $_GET['year_built']);
         $year_built_min_value = $years[0];
         $year_built_max_value = $years[1];
     }
     $main_properties_page = estetico_get_properties_page_id();
     $reset_url = estetico_get_properties_page_url_wpml($main_properties_page);
     $args = array('price_min' => $price_min, 'price_max' => $price_max, 'price_min_value' => $price_min_value, 'price_max_value' => $price_max_value, 'bedrooms_min' => $bedrooms_min, 'bedrooms_max' => $bedrooms_max, 'bedrooms_min_value' => $bedrooms_min_value, 'bedrooms_max_value' => $bedrooms_max_value, 'bathrooms_min' => $bathrooms_min, 'bathrooms_max' => $bathrooms_max, 'bathrooms_min_value' => $bathrooms_min_value, 'bathrooms_max_value' => $bathrooms_max_value, 'year_built_min' => $year_built_min, 'year_built_max' => $year_built_max, 'year_built_min_value' => $year_built_min_value, 'year_built_max_value' => $year_built_max_value, 'sq_feet_min' => $sq_feet_min, 'sq_feet_max' => $sq_feet_max, 'sq_feet_min_value' => $sq_feet_min_value, 'sq_feet_max_value' => $sq_feet_max_value, 'types' => $types, 'types_filtered' => $types_filtered, 'types_selected' => $types_selected, 'features' => $features, 'features_selected' => $features_selected, 'features_filtered' => $features_filtered, 'distance' => isset($_GET['distance']) ? $_GET['distance'] : 0, 'city' => isset($_GET['city']) ? $_GET['city'] : '', 'beds' => isset($_GET['beds']) ? $_GET['beds'] : 0, 'location_latitude' => isset($_GET['lat']) ? $_GET['lat'] : '', 'location_longitude' => isset($_GET['lng']) ? $_GET['lng'] : '', 'location' => isset($_GET['location']) ? $_GET['location'] : '', 'distances_config' => explode(',', estetico_get_setting('distances')), 'keywords' => isset($_GET['keywords']) ? $_GET['keywords'] : '', 'for_sale_rent' => isset($_GET['for_sale_rent']) ? $_GET['for_sale_rent'] : 'both', 'property_status' => isset($_GET['property_status']) ? $_GET['property_status'] : '', 'pets_allowed' => isset($_GET['pets_allowed']) ? $_GET['pets_allowed'] : '', 'reset_url' => $reset_url);
     estetico_load_component('widgets/properties_filter', $args);
 }
Ejemplo n.º 4
0
 function estetico_gallery_func($atts)
 {
     extract(shortcode_atts(array('ids' => ''), $atts));
     $images = array();
     if (!empty($ids)) {
         $images = explode(',', $ids);
     }
     ob_start();
     estetico_load_component('gallery', array('images' => $images));
     $content = ob_get_contents();
     ob_end_clean();
     return $content;
 }
Ejemplo n.º 5
0
    ?>
				<img src="<?php 
    echo $inner_pages_header;
    ?>
" alt="">
			</div>
			<?php 
}
?>
		</div>

		<?php 
if (is_front_page() || isset($template_name) && $template_name == 'home') {
    ?>
			<?php 
    estetico_load_component('quick_search');
    ?>
		<?php 
}
?>

	</div>
	<!-- /.container -->

</header>
<!-- /#header -->

<section id="main" data-role="main">

	<div class="container">
Ejemplo n.º 6
0
		rent : <?php 
        echo $property->getForSaleRent() == 'rent' ? 'true' : 'false';
        ?>
,
		title : '<?php 
        echo esc_html($property->getTitle());
        ?>
'
	});
	<?php 
    }
    ?>
	</script>

	<?php 
    estetico_load_component('common/properties_view_map_pack', array('properties_map_index' => $properties_map_index, 'options' => $options));
    ?>

	<?php 
    if ($list_style != 'list_map') {
        ?>
	<script>
	google.maps.event.addDomListener(window, 'load', function() {

		var propertiesMap = new PropertiesMap('properties-map-<?php 
        echo $properties_map_index;
        ?>
');
		propertiesMap.add(propertiesList);
		propertiesMap.localInitialize();
	});
Ejemplo n.º 7
0
			<?php 
    if ($property->getStreetViewPov() != 'ERROR') {
        ?>
				<li><a href="#street-view"><?php 
        _e('Google Street View', THEME_NAME);
        ?>
</a></li>
			<?php 
    }
    ?>
		</ul>

		<div class="box" id="map">
			
			<?php 
    estetico_load_component('common/properties_view_map_pack', array('properties_map_index' => 1, 'options' => array('show_legend' => false)));
    ?>

		</div>
		<?php 
    if ($property->getStreetViewPov() != 'ERROR') {
        ?>
		<div class="box" id="street-view">
			<div class="mobile-gutter">
				<div id="properties-street-view" data-pov="<?php 
        echo htmlentities($property->getStreetViewPov());
        ?>
"></div>
			</div>
		</div>
		<?php