diff --git a/.DS_Store b/.DS_Store index 400c9867..c21ebe86 100755 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/changelog.txt b/changelog.txt index 514f0269..30f64e10 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ += 1.6.3 - 2020-07-21 = +* Added - Login to show settings + = 1.6.2 - 2020-07-13 = * Added - Search form general setting diff --git a/inc/.DS_Store b/inc/.DS_Store index b524172e..d0c91910 100755 Binary files a/inc/.DS_Store and b/inc/.DS_Store differ diff --git a/inc/admin/settings/property.php b/inc/admin/settings/property.php index ad0be27c..ae42e6e1 100755 --- a/inc/admin/settings/property.php +++ b/inc/admin/settings/property.php @@ -573,6 +573,18 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab { 'after_row' => '
', ]; + $fields[] = [ + 'name' => esc_html__( 'Login to show Price', 'opalestate-pro' ), + 'desc' => esc_html__( 'Require users login to show Price', 'opalestate-pro' ), + 'id' => 'enable_single_login_to_show_price', + 'type' => 'switch', + 'options' => [ + 'on' => esc_html__( 'Enable', 'opalestate-pro' ), + 'off' => esc_html__( 'Disable', 'opalestate-pro' ), + ], + 'after_row' => '
', + ]; + $fields[] = [ 'name' => esc_html__( 'Show Author box', 'opalestate-pro' ), 'desc' => esc_html__( 'Show Author box in the single property page.', 'opalestate-pro' ), @@ -605,6 +617,17 @@ class Opalestate_Settings_Property_Tab extends Opalestate_Settings_Base_Tab { 'on' => esc_html__( 'Enable', 'opalestate-pro' ), 'off' => esc_html__( 'Disable', 'opalestate-pro' ), ], + ]; + + $fields[] = [ + 'name' => esc_html__( 'Login to show Enquire form', 'opalestate-pro' ), + 'desc' => esc_html__( 'Require users login to show Enquire form', 'opalestate-pro' ), + 'id' => 'enable_single_login_to_enquire_form', + 'type' => 'switch', + 'options' => [ + 'on' => esc_html__( 'Enable', 'opalestate-pro' ), + 'off' => esc_html__( 'Disable', 'opalestate-pro' ), + ], 'after_row' => '
', ]; diff --git a/inc/mixes-functions.php b/inc/mixes-functions.php index 9878783f..afc8dc06 100755 --- a/inc/mixes-functions.php +++ b/inc/mixes-functions.php @@ -1326,6 +1326,18 @@ function opalestate_is_require_login_to_show_author_box() { return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() ); } +function opalestate_is_require_login_to_show_price() { + $require = opalestate_get_option( 'enable_single_login_to_show_price', 'off' ); + + return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() ); +} + +function opalestate_is_require_login_to_show_enquire_form() { + $require = opalestate_get_option( 'enable_single_login_to_enquire_form', 'off' ); + + return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() ); +} + /** * Clean variables using sanitize_text_field. Arrays are cleaned recursively. * Non-scalar values are ignored. diff --git a/opal-estate-pro.php b/opal-estate-pro.php index 98099b28..d9ae046c 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.2 + * Version: 1.6.3 * 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.2' ); + _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.6.3' ); } /** @@ -163,7 +163,7 @@ if ( ! class_exists( 'OpalEstate' ) ) { public function setup_constants() { // Plugin version if ( ! defined( 'OPALESTATE_VERSION' ) ) { - define( 'OPALESTATE_VERSION', '1.6.2' ); + define( 'OPALESTATE_VERSION', '1.6.3' ); } // Plugin Folder Path diff --git a/readme.txt b/readme.txt index 12bff5b2..8bc080d0 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.6.2 +Stable tag: 1.6.3 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -150,6 +150,15 @@ This section describes how to install the plugin and get it working. * System tickets support 24/7 available : [free support](https://themelexus.ticksy.com/ "Visit the Plugin support Page") == Changelog == += 1.6.3 - 2020-07-21 = +* Added - Login to show settings + += 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/templates/messages/enquiry-form.php b/templates/messages/enquiry-form.php index c22b5aef..ac3436b8 100755 --- a/templates/messages/enquiry-form.php +++ b/templates/messages/enquiry-form.php @@ -5,6 +5,18 @@ if ( opalestate_get_option( 'enable_single_enquire_form', 'on' ) !== 'on' ) { return; } +if ( ! opalestate_is_require_login_to_show_enquire_form() ) { + ?> +
+

+ + + +
+ +
+
+ +
+
+