Plugin Directory

Changeset 3182437


Ignore:
Timestamp:
11/05/2024 02:46:21 PM (16 months ago)
Author:
apimofficiel
Message:

Commit Message:
===============

  • Version 2.6.2
  • Updated: Fix Advanced filters for areas and services
Location:
apimo/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apimo/trunk/apimo.php

    r3178857 r3182437  
    77 * Description: Manage Real Estat Bussiness
    88
    9  * Version: 2.6.1
     9 * Version: 2.6.2
    1010
    1111 * Author: ApiWork
  • apimo/trunk/assets/js/frontend.js

    r3171322 r3182437  
    251251    advance_area.push(jQuery(this).val());
    252252  });
     253
     254
    253255
    254256  var advance_service = [];
  • apimo/trunk/includes/apimo_ajax.php

    r3171322 r3182437  
    390390
    391391
    392 
    393 
     392   
     393
     394
     395    // advanced search :
     396   
    394397    if (!empty($_POST['advance_area'])) {
    395         // Sanitize the input
    396         $advance_area = sanitize_text_field($_POST['advance_area']);
    397 
    398         // Validate the input
     398        $advance_area = $_POST['advance_area'];
     399   
    399400        if (is_array($advance_area) && !empty($advance_area)) {
    400 
    401401            foreach ($advance_area as $area) {
     402                // Sanitize each area term ID
     403                $sanitized_area = intval($area); // Use intval for term IDs
    402404                $args['tax_query'][] = array(
    403405                    'taxonomy' => 'apimo_areas',
    404406                    'field' => 'term_id',
    405                     'terms' => $area,
    406                     // 'compare' => 'IN'
     407                    'terms' => $sanitized_area,
    407408                );
    408409            }
     
    412413
    413414
    414 
    415415    if (!empty($_POST['advance_service'])) {
    416416        // Sanitize the input
    417         $advance_service = sanitize_text_field($_POST['advance_service']);
     417        $advance_service = $_POST['advance_service'];
    418418
    419419        // Validate the input
     
    421421            foreach ($advance_service as $service) {
    422422                // Validate the term ID
     423                $sanitized_service = intval($service); // Use intval for term IDs
     424
    423425                $args['tax_query'][] = array(
    424426                    'taxonomy' => 'apimo_service',
    425427                    'field' => 'term_id',
    426                     'terms' => $service,
     428                    'terms' => $sanitized_service,
    427429                    // 'compare' => 'IN'
    428430                );
  • apimo/trunk/readme.txt

    r3178857 r3182437  
    33Tags: real estate, property management, listings, clients, leads, showings, open houses, reports
    44Tested up to: 6.4.2
    5 Stable tag: 2.6.1
     5Stable tag: 2.6.2
    66License: GPLv2
    77License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    175175== Changelog ==
    176176
     177= 2.6.2 =
     178* Fix Advanced filter for areas and services
     179
    177180= 2.6 =
    178181* Add more translations
Note: See TracChangeset for help on using the changeset viewer.