/**
  *
  */
 public static function getPriceMin()
 {
     $args = array();
     $args['post_status'] = 'publish';
     $args['post_type'] = 'properties';
     $args['posts_per_page'] = PHP_INT_MAX;
     $curr_lang = estetico_surpress_wpml_query_before();
     $properties = new WP_Query($args);
     estetico_surpress_wpml_query_after($curr_lang);
     // Set price to unbelievable high number. Although with current US economy this might be a problem at some point :)
     $price = 9999999999.0;
     foreach ($properties->posts as $property) {
         $p = new Property();
         $p->setData($property);
         $_price = $p->getPrice(null, true);
         if ($_price < $price) {
             $price = $_price;
         }
     }
     return $price;
 }
Exemplo n.º 2
0
    ?>
"></div>
                </div>
            <?php 
}
?>
			<div class="prices-wrapper">
				<?php 
$for_sale_rent = $property->getForSaleRent();
if ($for_sale_rent == 'sale' || $for_sale_rent == 'both') {
    ?>
				<div class="price"><?php 
    echo __('Price for sale', THEME_NAME);
    ?>
: <?php 
    echo $property->getPrice(true);
    ?>
</div>
				<?php 
}
?>
				<?php 
if (($for_sale_rent == 'rent' || $for_sale_rent == 'both') && $property->getRentMonthPrice(false) > 0) {
    ?>
				<div class="price <?php 
    echo $for_sale_rent;
    ?>
 month"><?php 
    echo __('Price for rent', THEME_NAME);
    ?>
: <?php