From 920a1cbe1a40298a9e40c47abe3c30eed59f5bf1 Mon Sep 17 00:00:00 2001 From: Alpha Date: Tue, 21 Jul 2020 08:36:32 +0700 Subject: [PATCH] Update --- .DS_Store | Bin 12292 -> 12292 bytes changelog.txt | 3 +++ inc/.DS_Store | Bin 10244 -> 14340 bytes inc/admin/settings/property.php | 23 +++++++++++++++++++++++ inc/mixes-functions.php | 12 ++++++++++++ opal-estate-pro.php | 6 +++--- readme.txt | 11 ++++++++++- templates/messages/enquiry-form.php | 12 ++++++++++++ templates/parts/property-loop-price.php | 10 ++++++++++ 9 files changed, 73 insertions(+), 4 deletions(-) diff --git a/.DS_Store b/.DS_Store index 400c98674aee65c563f6f98746d69d92a7734f5f..c21ebe861b090b102f408f35b6296e2fe7c336ad 100755 GIT binary patch delta 665 zcma)&%}*0i6va6*g&BFso0>FJ+tNZ?AUe_7NlRLdR#8L=iHjmdSS~q9h?>l4 z0~u8x*EN;C;Dw6Q-YQ8a%1+O;W>%HwD{@DtMB-U}R-?&U<2IR)_=KKTY1VwIyfme9Qwd0L-u@C;}SO8(fDqu&@j{zJr;f8S>BhWC8Qzl>;FOM0V#U)%u0ar}O8zv;f zE!@Uk+{1l5FkzSR6f0Q8bG*VDUe}=4@r7v}ZhSRfTI0=&3ynsT=Sc(W^b|G+17X<{ gRFrwyb3PJKWKVaPt$7r-?pxr>kOtSa`hT7O0Phr}Z~y=R delta 1268 zcmds$U2GIp6vyv>*{*ZBq1-K7I;Gooait5g#ck~eptPk0QlL=iu4yCEcD8#-CvIoU z&TLJoO^qSJ3gKlG2!w!!k7!M7EY$?WL?57y4<>dW^nn;-!UHA})EM)e>N9|e7WwnFXP-MMFP*8t}kQ}l?WX6a*Mhh_=W?s6ZY zefm(!i0a3L{W&jPP3cT=nSbrNr=Mxq($bM#$-O1a$LveKnkiS5#tdylI8L=(tx$MS z>C43RqZ!>A&z5lS%E~I0y_Aqw?@J~0Bf3cNd4)QWC#zKTP%hGu7V@1?6vtf?Qd!KD z#kp2ExG~IF>}B0ZaFga!BXvxDA*sdUBFPgppV!#L)ZQ_XHuaRj_ZFO6pJQs@P-oqr|~9E;w@anWxRuTF@u}<6u0pi?qUIpSV9)}a34S7 zS9^GMHGZ>SEA`Di@HA7rUC`L?XuRP+X$)$A$8{I0wlDisJMLXO#6tcJR7%B>Rm;~@ z_(T3$Md2>zgGK!HRI0<5SYza-e@D3NFb66+>xcCfai13R%_qCJQn#Bdn>7?gN( za7SQZ6yrFCS1~COzkzAV_Y^{>aTe!r9v39)Yq*a0@IF4kJU)@YZ#l^C;45V94?Wem zH#b`nTQSE1GoD?4#7C35X+0&m5&x=1xr1*3~yPgaftD zHZ)I$0~2-i4UOTz<}FQ=lT=a4L%VwVGq0aMf8om2YuE4G&8Gr+OS}d9*enRSG;(L0 UWqQ0T_U*E^IrsXH{%<|~4ZEXAxBvhE 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 b524172ec421f6c9ae16ba27c327f6a0f22fb3b2..d0c91910040379211c83a40536dd28c12ba86722 100755 GIT binary patch delta 794 zcmZuv&1(}u6rV}9?d&9Nrjc%&FS|C8s>F7iNK^5vAGBB%RA}snC?wrc7n9A$Zdx-NJSQSl(2yjavfz^i!iU~kTDA{2Gt&3pXbn|bq_-&;MkT9yF- zaClDb13=*+;^uhb2SC68$o@6CJLYwYxCOcKm;g`$Wk5j{m|)SWtb3V~5Dq&P0yo5S z)vXl;V}2xGDCGh0nE7%+GfYMK3O!z-p|J^x*e8vS;iIe+T{`#J-xltS@7kNn92nea zZV8aqAjUJAN_A7apwVh}K~v33(>Y_7>Z+z+oSfGTEnlD$dag)YVNw(~NK2quYL`NY z#L?7TUaQP$=Aw(T*I{YdO-H3JgwCotla5p=-&MC)VyA>B4DAXfIV8Hs?mZY!T-J1z z82o1EJw3fx$`*2YS|F;3TqwN{OOx}oYG@^$9It}|K`c$pmWoCGa-)tNJS0h(^G??j zIm0|zraD#02UNRdC@M+QPHsq5sfrMa4<`9v^5t@4*CTTC3-AiO2Oq&F@ELqz&m*TZ zci>%k58j6l;1l>1K7$r~3E#lC?m6Ib1aa1Q&HdToJN7-4wKs!4$W?ZQ5f!=qz%F&cpU>pMbWIoyRfGs14fW+D!PBX~p<3HY1UW^A~j z7xuvv8{B@xcN^CDtiy+_Biacc*^BKrk+t$mfTHau*P7UJ>#c1mr9UaB(&?q7e09H) zPRf~nwj-Ff&%`W`wenL4HPnbIKJG`ijJsD*ylh delta 165 zcmZoEXbF&DU|?W$DortDU{C-uIe-{M3-C-V6q~3gIoZI3MI6Xy;0Izxpg03VURiKa zUQT{q`sRm{T5KB|su?+f5+K0A4HOb**{sg '
', ]; + $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() ) { + ?> + + + +