Plugin Directory

Changeset 3210806


Ignore:
Timestamp:
12/20/2024 02:57:18 AM (15 months ago)
Author:
g5theme
Message:

Fix query property by features

Location:
essential-real-estate/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • essential-real-estate/trunk/CHANGELOG.md

    r3204549 r3210806  
    11Changelog
    22=========
     3### 5.1.8 - December 20, 2024
     4* Fix query property by features
     5
    36### 5.1.7 - December 09, 2024
    47* Fix capabilities for post_types: "trans_log", "invoice" and "user_package"
  • essential-real-estate/trunk/essential-real-estate.php

    r3204549 r3210806  
    44 * Plugin URI: https://wordpress.org/plugins/essential-real-estate
    55 * Description: The latest plugins Real Estate you want. Completely all features, easy customize and override layout, functions. Supported global payment, build market, single, list property, single agent...etc. All fields are defined dynamic, they will help you can build any kind of Real Estate website.
    6  * Version: 5.1.7
     6 * Version: 5.1.8
    77 * Author: G5Theme
    88 * Author URI: http://themeforest.net/user/g5theme
     
    2929
    3030if (!defined('ERE_PLUGIN_VER')) {
    31     define('ERE_PLUGIN_VER', '5.1.7');
     31    define('ERE_PLUGIN_VER', '5.1.8');
    3232}
    3333if (!defined('ERE_PLUGIN_FILE')) {
  • essential-real-estate/trunk/includes/class-ere-query.php

    r3150612 r3210806  
    8686                'max-land-area' => '',
    8787                'property_identity' => '',
    88                 'features' => '',
     88                'other_features' => '',
    8989                'item_amount' => '',
    9090                'paged' => 1,
     
    751751
    752752        public function get_tax_query_feature( $tax_query ) {
    753             $features = isset( $_REQUEST['features'] ) ?  wp_unslash( $_REQUEST['features'] )  : $this->_atts['features'];
     753            $features = isset( $_REQUEST['other_features'] ) ?  wp_unslash( $_REQUEST['other_features'] )  : $this->_atts['other_features'];
    754754            if ( ! empty( $features )) {
    755                 if (is_string($features) && strpos($features,';')) {
    756                     $features = explode(';',$features);
    757                 }
    758 
     755                if (!is_array($features)) {
     756                    $features = explode(';',$features);
     757                }
    759758                $tax_query[] = array(
    760759                    'taxonomy' => 'property-feature',
  • essential-real-estate/trunk/public/templates/property/search-fields/property_feature.php

    r3123067 r3210806  
    3434};
    3535
     36$prefix = uniqid('__');
     37
    3638$has_request_features = !empty($request_features) && is_array($request_features) & count($request_features) > 0;
    3739?>
     
    5860                                    <div class="form-check">
    5961                                        <?php if (!empty($request_features) && in_array($child_item->slug, $request_features)):  ?>
    60                                             <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($child_item->term_id)?>" name="other_features" checked="checked" value="<?php echo esc_attr($child_item->slug) ?>" />
     62                                            <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($child_item->term_id . $prefix)?>" name="other_features" checked="checked" value="<?php echo esc_attr($child_item->slug) ?>" />
    6163                                        <?php else: ?>
    62                                             <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($child_item->term_id)?>" name="other_features" value="<?php echo esc_attr($child_item->slug) ?>" />
     64                                            <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($child_item->term_id . $prefix)?>" name="other_features" value="<?php echo esc_attr($child_item->slug) ?>" />
    6365                                        <?php endif; ?>
    64                                         <label class="form-check-label" for="property_feature_<?php echo esc_attr($child_item->term_id)?>">
     66                                        <label class="form-check-label" for="property_feature_<?php echo esc_attr($child_item->term_id . $prefix)?>">
    6567                                            <?php echo esc_html($child_item->name); ?>
    6668                                        </label>
     
    7779                            <div class="form-check">
    7880                                <?php if (!empty($request_features) && in_array($parents_item->slug, $request_features)):  ?>
    79                                     <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($parents_item->term_id)?>" name="other_features" checked="checked" value="<?php echo esc_attr($parents_item->slug) ?>" />
     81                                    <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($parents_item->term_id . $prefix)?>" name="other_features" checked="checked" value="<?php echo esc_attr($parents_item->slug) ?>" />
    8082                                <?php else: ?>
    81                                     <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($parents_item->term_id)?>" name="other_features" value="<?php echo esc_attr($parents_item->slug) ?>" />
     83                                    <input type="checkbox" class="form-check-input" id="property_feature_<?php echo esc_attr($parents_item->term_id . $prefix)?>" name="other_features" value="<?php echo esc_attr($parents_item->slug) ?>" />
    8284                                <?php endif; ?>
    83                                 <label class="form-check-label" for="property_feature_<?php echo esc_attr($parents_item->term_id)?>">
     85                                <label class="form-check-label" for="property_feature_<?php echo esc_attr($parents_item->term_id . $prefix)?>">
    8486                                    <?php echo esc_html($parents_item->name); ?>
    8587                                </label>
  • essential-real-estate/trunk/readme.txt

    r3204549 r3210806  
    55Requires at least: 4.5
    66Tested up to: 6.6.2
    7 Stable tag: 5.1.7
     7Stable tag: 5.1.8
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9999
    100100== Changelog ==
     101= 5.1.8 =
     102* Fix query property by features
     103
    101104= 5.1.7 =
    102105* Fix capabilities for post_types: "trans_log", "invoice" and "user_package"
Note: See TracChangeset for help on using the changeset viewer.