Esempio n. 1
0
echo __('Finalize', WPL_TEXTDOMAIN);
?>
</span>
                        <i class="icon-finalize"></i>
                    </a>        
                </li>
                
                <?php 
$category_listing_specific_array = array();
$category_property_type_specific_array = array();
foreach ($this->field_categories as $category) {
    $display = '';
    if (trim($category->listing_specific) != '') {
        $category_listing_specific_array[$category->id] = array();
        if (substr($category->listing_specific, 0, 5) == 'type=') {
            $specified_listings = wpl_global::get_listing_types_by_parent(substr($category->listing_specific, 5));
            foreach ($specified_listings as $listing_type) {
                $category_listing_specific_array[$category->id][] = $listing_type["id"];
            }
        } else {
            $specified_listings = explode(',', trim($category->listing_specific, ', '));
            $category_listing_specific_array[$category->id] = $specified_listings;
        }
        if (!in_array($this->values['listing'], $category_listing_specific_array[$category->id])) {
            $display = "display:none;";
        }
    } elseif (trim($category->property_type_specific) != '') {
        $category_property_type_specific_array[$category->id] = array();
        if (substr($category->property_type_specific, 0, 5) == 'type=') {
            $specified_property_types = wpl_global::get_property_types_by_parent(substr($category->property_type_specific, 5));
            foreach ($specified_property_types as $property_type) {
Esempio n. 2
0
    $return['type'] = $field->type;
    $return['name'] = __($field->name, WPL_TEXTDOMAIN);
    $rendered_price = wpl_render::render_price($value, $values[$field->table_column . '_unit']);
    $return['value'] = $rendered_price;
    $return['price_only'] = $rendered_price;
    $price_period = array();
    if (isset($values[$field->table_column . '_period'])) {
        $price_period = wpl_property::render_field($values[$field->table_column . '_period'], wpl_flex::get_dbst_id($field->table_column . '_period', $field->kind));
    }
    if (isset($price_period['value'])) {
        $return['value'] .= ' ' . $price_period['value'];
        $return['price_period'] = $price_period['value'];
    }
    /** Add "From" to Vacation Rental Properties **/
    if (wpl_global::check_addon('calendar')) {
        $listing_types = wpl_global::get_listing_types_by_parent(3);
        foreach ($listing_types as $listing) {
            $vacational_listing_types[] = $listing['id'];
        }
        if (is_array($vacational_listing_types) and in_array($values['listing'], $vacational_listing_types)) {
            $return['value'] = __('From', WPL_TEXTDOMAIN) . ' ' . $return['value'];
        }
    }
    if (isset($options['if_zero']) and $options['if_zero'] == 2 and !trim($value)) {
        $return['value'] = __($options['call_text'], WPL_TEXTDOMAIN);
    }
    if (isset($options['if_zero']) and !$options['if_zero'] and !trim($value)) {
        $return = array();
    }
    $done_this = true;
} elseif ($type == 'mmprice' and !$done_this) {