Fixes
This commit is contained in:
parent
e2db40a211
commit
22c65f696a
@ -77,11 +77,19 @@ class OpalEstate_Search {
|
||||
$tax_query = [];
|
||||
|
||||
if ( isset( $_GET['location'] ) && $_GET['location'] != -1 ) {
|
||||
$tax_query[] = [
|
||||
'taxonomy' => 'opalestate_location',
|
||||
'field' => 'slug',
|
||||
'terms' => sanitize_text_field( $_GET['location'] ),
|
||||
];
|
||||
if ( is_array( $_GET['location'] ) ) {
|
||||
$tax_query[] = [
|
||||
'taxonomy' => 'opalestate_location',
|
||||
'field' => 'slug',
|
||||
'terms' => opalestate_clean( $_GET['location'] ),
|
||||
];
|
||||
} else {
|
||||
$tax_query[] = [
|
||||
'taxonomy' => 'opalestate_location',
|
||||
'field' => 'slug',
|
||||
'terms' => sanitize_text_field( $_GET['location'] ),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $_GET['state'] ) && $_GET['state'] != -1 ) {
|
||||
@ -101,11 +109,19 @@ class OpalEstate_Search {
|
||||
}
|
||||
|
||||
if ( isset( $_GET['city'] ) && $_GET['city'] != -1 ) {
|
||||
$tax_query[] = [
|
||||
'taxonomy' => 'opalestate_city',
|
||||
'field' => 'slug',
|
||||
'terms' => sanitize_text_field( $_GET['city'] ),
|
||||
];
|
||||
if ( is_array( $_GET['city'] ) ) {
|
||||
$tax_query[] = [
|
||||
'taxonomy' => 'opalestate_city',
|
||||
'field' => 'slug',
|
||||
'terms' => opalestate_clean( $_GET['city'] ),
|
||||
];
|
||||
} else {
|
||||
$tax_query[] = [
|
||||
'taxonomy' => 'opalestate_city',
|
||||
'field' => 'slug',
|
||||
'terms' => sanitize_text_field( $_GET['city'] ),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $_GET['types'] ) && $_GET['types'] != -1 ) {
|
||||
@ -165,6 +181,8 @@ class OpalEstate_Search {
|
||||
];
|
||||
}
|
||||
|
||||
$tax_query = apply_filters( 'opalestate_search_results_tax_query', $tax_query );
|
||||
|
||||
if ( $tax_query ) {
|
||||
$args['tax_query'] = [ 'relation' => 'AND' ];
|
||||
$args['tax_query'] = array_merge( $args['tax_query'], $tax_query );
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Plugin Name: Opal Estate Pro
|
||||
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/
|
||||
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
||||
* Version: 1.5.6
|
||||
* Version: 1.5.7
|
||||
* Author: WPOPAL
|
||||
* Author URI: http://www.wpopal.com
|
||||
* Requires at least: 4.9
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
global $post;
|
||||
|
||||
if ( opalestate_get_option( 'enable_single_enquire_form' , 'on' ) != 'on' ) {
|
||||
return;
|
||||
if ( opalestate_get_option( 'enable_single_enquire_form', 'on' ) !== 'on' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$message = sprintf( __( 'Hi, I am interested in %s (Property ID: %s)', 'opalestate-pro' ), get_the_title(), get_the_ID() );
|
||||
|
||||
$property_id = get_the_ID();
|
||||
$infor_id = apply_filters( 'opalestate_contact_form_infor_id', $property_id, $property_id );
|
||||
$message = sprintf( __( 'Hi, I am interested in %s (Property ID: %s)', 'opalestate-pro' ), get_the_title(), $infor_id );
|
||||
$heading = esc_html__( 'Enquire about property', 'opalestate-pro' );
|
||||
$object = OpalEstate_User_Message::get_instance();
|
||||
$fields = $object->get_equiry_form_fields( $message );
|
||||
|
@ -1,12 +1,11 @@
|
||||
<?php
|
||||
$layout = 'collapse-city';
|
||||
$settings = array();
|
||||
<?php
|
||||
$layout = apply_filters( 'opalestate_archive_search_block_form_layout', 'collapse-city' );
|
||||
$settings = [];
|
||||
?>
|
||||
<div class="opalestate-archive-search-block">
|
||||
<div class="container">
|
||||
<div class="search-properies-form">
|
||||
<?php echo opalestate_load_template_path( 'search-box/'.$layout , $settings ); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="search-properies-form">
|
||||
<?php echo opalestate_load_template_path( 'search-box/' . $layout, $settings ); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user