From a5a053b0256a13aa53a6ced2aed2656d78353f58 Mon Sep 17 00:00:00 2001 From: Alpha Date: Mon, 13 Jul 2020 09:41:00 +0700 Subject: [PATCH] Update --- changelog.txt | 6 ++++++ inc/.DS_Store | Bin 10244 -> 10244 bytes inc/admin/settings/property.php | 8 ++++++++ inc/property/class-opalestate-query.php | 3 +++ inc/property/class-opalestate-shortcodes.php | 7 +------ opal-estate-pro.php | 6 +++--- readme.txt | 2 +- .../opalestate-property-collection.php | 4 ++++ templates/parts/archive-search-block.php | 5 +++-- templates/single-property/facilities.php | 2 +- 10 files changed, 30 insertions(+), 13 deletions(-) diff --git a/changelog.txt b/changelog.txt index 38bb70e4..514f0269 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,9 @@ += 1.6.2 - 2020-07-13 = +* Added - Search form general setting + += 1.6.1 - 2020-07-07 = +* Fixes - Property collection sort order + = 1.6 - 2020-06-25 = * Added - Related properties setting * Added - Nearby properties setting diff --git a/inc/.DS_Store b/inc/.DS_Store index c2b05e73778dcc54d0e4d0f47dfac89d74a5e515..b524172ec421f6c9ae16ba27c327f6a0f22fb3b2 100755 GIT binary patch delta 69 zcmZn(XbG6$&&aw#IrdjHYjXnS14tlJV(3(0Nkt# $checkes, ]; + $fields[] = [ + 'name' => esc_html__( 'Default Search form', 'opalestate-pro' ), + 'id' => 'default_search_form', + 'type' => 'select', + 'options' => opalestate_search_properties_form_styles(), + 'default' => 'collapse-city', + ]; + $fields[] = [ 'name' => esc_html__( 'Default Display mode', 'opalestate-pro' ), 'id' => 'displaymode', diff --git a/inc/property/class-opalestate-query.php b/inc/property/class-opalestate-query.php index 75d82065..28722d23 100755 --- a/inc/property/class-opalestate-query.php +++ b/inc/property/class-opalestate-query.php @@ -198,6 +198,9 @@ class Opalestate_Query { 'post_type' => 'opalestate_property', 'posts_per_page' => isset( $args['posts_per_page'] ) ? $args['posts_per_page'] : 5, 'paged' => isset( $args['paged'] ) ? $args['paged'] : 1, + 'post_status' => 'publish', + 'order_by' => isset( $args['orderby'] ) ? $args['orderby'] : 'post_date', + 'order' => isset( $args['order'] ) ? $args['order'] : 'DESC', ]; $condition = array_merge( $condition, $args ); diff --git a/inc/property/class-opalestate-shortcodes.php b/inc/property/class-opalestate-shortcodes.php index 0c1d1fdf..782bd625 100755 --- a/inc/property/class-opalestate-shortcodes.php +++ b/inc/property/class-opalestate-shortcodes.php @@ -43,18 +43,14 @@ class OpalEstate_Shortcodes { * defined list of shortcode and functions of this for each. */ public function __construct() { - $this->shortcodes = [ - 'search_properties_form' => [ 'code' => 'search_properties_form', 'label' => esc_html__( 'Search Properties Form', 'opalestate-pro' ) ], 'properties' => [ 'code' => 'properties', 'label' => esc_html__( 'Properties', 'opalestate-pro' ) ], 'search_properties_result' => [ 'code' => 'search_properties_result', 'label' => esc_html__( 'Search Properties Result', 'opalestate-pro' ) ], 'search_properties' => [ 'code' => 'search_properties', 'label' => esc_html__( 'Search Properties', 'opalestate-pro' ) ], 'search_split_maps' => [ 'code' => 'search_split_maps', 'label' => esc_html__( 'Search Split Maps', 'opalestate-pro' ) ], - 'search_map_properties' => [ 'code' => 'search_map_properties', 'label' => esc_html__( 'Show Map + Search Box and Properties', 'opalestate-pro' ) ], 'ajax_map_search' => [ 'code' => 'ajax_map_search', 'label' => esc_html__( 'Ajax Search Map Properties And Horizontal Search', 'opalestate-pro' ) ], - 'register_form' => [ 'code' => 'register_form', 'label' => esc_html__( 'Register User Form', 'opalestate-pro' ) ], 'login_form' => [ 'code' => 'login_form', 'label' => esc_html__( 'Login Form', 'opalestate-pro' ) ], ]; @@ -66,7 +62,6 @@ class OpalEstate_Shortcodes { if ( is_admin() ) { add_action( 'media_buttons', [ $this, 'shortcode_button' ] ); } - } /** @@ -220,4 +215,4 @@ class OpalEstate_Shortcodes { } -OpalEstate_Shortcodes::get_instance(); \ No newline at end of file +OpalEstate_Shortcodes::get_instance(); diff --git a/opal-estate-pro.php b/opal-estate-pro.php index 2da4cc4f..98099b28 100755 --- a/opal-estate-pro.php +++ b/opal-estate-pro.php @@ -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.6 + * Version: 1.6.2 * Author: WPOPAL * Author URI: http://www.wpopal.com * Requires at least: 4.9 @@ -154,7 +154,7 @@ if ( ! class_exists( 'OpalEstate' ) ) { */ public function __clone() { // Cloning instances of the class is forbidden - _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.6' ); + _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.6.2' ); } /** @@ -163,7 +163,7 @@ if ( ! class_exists( 'OpalEstate' ) ) { public function setup_constants() { // Plugin version if ( ! defined( 'OPALESTATE_VERSION' ) ) { - define( 'OPALESTATE_VERSION', '1.6' ); + define( 'OPALESTATE_VERSION', '1.6.2' ); } // Plugin Folder Path diff --git a/readme.txt b/readme.txt index c0835506..12bff5b2 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://wpdocs.gitbook.io/opal-estate/ Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace Requires at least: 4.9 Tested up to: 5.3.2 -Stable tag: 1.5.9 +Stable tag: 1.6.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html diff --git a/templates/elementor-templates/opalestate-property-collection.php b/templates/elementor-templates/opalestate-property-collection.php index 1f3a63c0..6744bc39 100755 --- a/templates/elementor-templates/opalestate-property-collection.php +++ b/templates/elementor-templates/opalestate-property-collection.php @@ -5,6 +5,8 @@ $settings = array_merge( [ 'paged' => 1, 'showsortby' => false, 'style' => 'grid', + 'orderby' => 'post_date', + 'order' => 'DESC', ], $settings ); extract( $settings ); @@ -24,6 +26,8 @@ $args = [ 'statuses' => $statuses, 'showmode' => $showmode, 'labels' => $labels, + 'orderby' => $orderby, + 'order' => $order, ]; $query = Opalestate_Query::get_property_query( $args ); diff --git a/templates/parts/archive-search-block.php b/templates/parts/archive-search-block.php index a7fd7099..bb135e57 100755 --- a/templates/parts/archive-search-block.php +++ b/templates/parts/archive-search-block.php @@ -1,6 +1,7 @@
diff --git a/templates/single-property/facilities.php b/templates/single-property/facilities.php index cf5a65d2..f3a04b18 100755 --- a/templates/single-property/facilities.php +++ b/templates/single-property/facilities.php @@ -7,7 +7,7 @@ $facilities = $property->get_facilities(); get_block_setting( 'facilities' ) && $facilities && isset( $facilities[0] ) && ! empty( $facilities[0] ) ): ?>
-
+