From 4ccc93892f4a1ed8b97308edd561540a0674a55c Mon Sep 17 00:00:00 2001 From: Hoang Huu Date: Fri, 21 Feb 2020 11:13:46 +0700 Subject: [PATCH] Fix Enquire email & Contact email --- assets/js/frontend/property.js | 1 - changelog.txt | 3 + inc/class-opalestate-email.php | 176 +++++++++++------- .../class-opalestate-abs-email-template.php | 25 +-- .../class-opalestate-admin-new-submitted.php | 2 +- inc/email/class-opalestate-approve.php | 2 +- .../class-opalestate-email-notifycation.php | 24 +-- inc/email/class-opalestate-new-submitted.php | 2 +- .../class-opalestate-request-viewing.php | 15 +- inc/message/class-opalestate-message.php | 96 +++++----- inc/mixes-functions.php | 14 +- opal-estate-pro.php | 6 +- readme.txt | 5 +- 13 files changed, 198 insertions(+), 173 deletions(-) diff --git a/assets/js/frontend/property.js b/assets/js/frontend/property.js index 5b0e895c..a5c19f05 100755 --- a/assets/js/frontend/property.js +++ b/assets/js/frontend/property.js @@ -120,7 +120,6 @@ window.opalestate_messages = function() { function make_ajax ( data, _this ) { $( '.opalestate-message-notify', _this ).remove(); var action = $( _this ).data('action')? $( _this ).data('action') : 'send_email_contact'; - console.log(action) toggle_submit_button( _this ); $.ajax({ type : 'POST', diff --git a/changelog.txt b/changelog.txt index 737b2caf..4f7f20c9 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ += 1.3.4 - 2020-02-21 = +* Fixes - Enquire email & Contact email + = 1.3.3 - 2020-02-20 = * Added - Required login to show Author box * Added - Search field settings. diff --git a/inc/class-opalestate-email.php b/inc/class-opalestate-email.php index 1580b695..ac0c9572 100755 --- a/inc/class-opalestate-email.php +++ b/inc/class-opalestate-email.php @@ -73,6 +73,7 @@ class Opalestate_Emails { */ public static function send_notifycation( $content ) { $mail = new OpalEstate_Send_Email_Notification(); + $mail->set_type( $content ); $mail->set_args( $content ); $return = self::send_mail_now( $mail ); @@ -191,6 +192,51 @@ class Opalestate_Emails { * render setting email fields with default values */ public static function setting_email_fields( $fields ) { + $enquire_list_tags = '
+

Use the following tags to automatically add property information to the emails. Tags labeled with an asterisk (*) can be used in the email subject as well.

+ +
+ {receive_name} Name of the agent who made the property +
+ +
+ {property_name} Name of the property +
+ +
+ {property_link} Link of the property +
+ +
+ {property_edit_link} Link for editing of the property (admin) +
+ +
+ {name} Name of the user who contact via email form +
+ +
+ {email} Email of the user who contact via email form +
+ +
+ {phone} Phone number of who sent via form +
+ +
+ {message} Message content of who sent via form +
+ +
+ {site_link} A link to this website +
+ +
+ {current_time} Current date and time +
+ +
'; + $enquire_list_tags = apply_filters( 'opalestate_email_enquire_tags', $enquire_list_tags ); $contact_list_tags = '

Use the following tags to automatically add property information to the emails. Tags labeled with an asterisk (*) can be used in the email subject as well.

@@ -198,10 +244,6 @@ class Opalestate_Emails {
{receive_name} Name of the agent who made the property
- -
- {property_link} Link of the property -
{name} Name of the user who contact via email form @@ -210,6 +252,10 @@ class Opalestate_Emails {
{email} Email of the user who contact via email form
+ +
+ {phone} Phone number of who sent via form +
{message} * Message content of who sent via form @@ -224,6 +270,7 @@ class Opalestate_Emails {
'; + $contact_list_tags = apply_filters( 'opalestate_email_contact_tags', $contact_list_tags ); $review_list_tags = '

Use the following tags to automatically add property information to the emails. Tags labeled with an asterisk (*) can be used in the email subject as well.

@@ -231,10 +278,18 @@ class Opalestate_Emails {
{receive_name} Name of the agent who made the property
+ +
+ {property_name} Name of the property +
{property_link} Link of the property
+ +
+ {property_edit_link} Link for editing of the property (admin) +
{name} Name of the user who contact via email form @@ -244,12 +299,16 @@ class Opalestate_Emails { {email} Email of the user who contact via email form
+
+ {schedule_date} Schedule date +
+
{schedule_time} Schedule time
- {schedule_date} Schedule date + {phone} Phone number of who sent via form
@@ -265,12 +324,13 @@ class Opalestate_Emails {
'; + $review_list_tags = apply_filters( 'opalestate_email_review_tags', $review_list_tags ); $list_tags = '

Use the following tags to automatically add property information to the emails. Tags labeled with an asterisk (*) can be used in the email subject as well.

- {property_name} Email of the user who made the property + {property_name} Name of the property
@@ -286,17 +346,13 @@ class Opalestate_Emails {
- {submitted_date} Email of the user who made the property + {submitted_date} Submitted date
- {user_name} * Name of the user who made the property + {user_name} Name of the user who made the property
-
- {date} * Date and time of the property -
-
{site_name} The name of this website
@@ -304,7 +360,7 @@ class Opalestate_Emails { {site_link} A link to this website
- {current_time} Current date and time + {current_time} Current date and time when email sent
'; $list_tags = apply_filters( 'opalestate_email_tags', $list_tags ); @@ -318,7 +374,7 @@ class Opalestate_Emails { [ 'name' => esc_html__( 'Email Settings', 'opalestate-pro' ), 'desc' => '
', - 'id' => 'opalestate_title_email_settings_1', + 'id' => 'opalestate_title_email_settings', 'type' => 'title', ], [ @@ -340,7 +396,7 @@ class Opalestate_Emails { [ 'name' => esc_html__( 'Email Submission Templates (Template Tags)', 'opalestate-pro' ), 'desc' => $list_tags . '

', - 'id' => 'opalestate_title_email_settings_2', + 'id' => 'opalestate_title_email_submission_template', 'type' => 'title', ], @@ -349,7 +405,7 @@ class Opalestate_Emails { [ 'name' => esc_html__( 'New Property Submission (Customer)', 'opalestate-pro' ), 'desc' => '
', - 'id' => 'opalestate_title_email_settings_3', + 'id' => 'opalestate_title_email_new_property_customer', 'type' => 'title', ], [ @@ -386,7 +442,7 @@ class Opalestate_Emails { [ 'name' => esc_html__( 'New Property Submission (Admin)', 'opalestate-pro' ), 'desc' => '
', - 'id' => 'opalestate_title_email_settings_admin', + 'id' => 'opalestate_title_email_new_property_admin', 'type' => 'title', 'before_row' => '
', ], @@ -406,9 +462,6 @@ class Opalestate_Emails { 'name' => esc_html__( 'Email Subject', 'opalestate-pro' ), 'type' => 'text', 'desc' => esc_html__( 'The email subject for admin notifications.', 'opalestate-pro' ), - 'attributes' => [ - 'rows' => 3, - ], 'default' => esc_html__( 'You received a new submission: {property_name} from {user_mail}', 'opalestate-pro' ), ], @@ -424,7 +477,7 @@ class Opalestate_Emails { [ 'name' => esc_html__( 'Approved property for publish (Customer)', 'opalestate-pro' ), 'desc' => '
', - 'id' => 'opalestate_title_email_settings_4', + 'id' => 'opalestate_title_email_approved_property', 'type' => 'title', 'before_row' => '
', ], @@ -444,12 +497,7 @@ class Opalestate_Emails { 'name' => esc_html__( 'Email Subject', 'opalestate-pro' ), 'type' => 'text', 'desc' => esc_html__( 'The email subject a user should receive when they make an initial property request.', 'opalestate-pro' ), - 'attributes' => [ - 'placeholder' => 'Your property at I Love WordPress is pending', - get_bloginfo( 'name' ), - 'rows' => 3, - ], - 'default' => esc_html__( 'New Property Listing Submitted: {property_name}', 'opalestate-pro' ), + 'default' => esc_html__( 'New Property Listing Approved: {property_name}', 'opalestate-pro' ), ], [ @@ -461,9 +509,9 @@ class Opalestate_Emails { ], /// enquire contact template //// [ - 'name' => esc_html__( 'Email Enquiry Contact Templates (Template Tags)', 'opalestate-pro' ), - 'desc' => $contact_list_tags . '

', - 'id' => 'opalestate_title_email_settings_6_1', + 'name' => esc_html__( 'Email Enquire Contact Form (in the single property page)', 'opalestate-pro' ), + 'desc' => $enquire_list_tags . '

', + 'id' => 'opalestate_title_email_enquire_contact', 'type' => 'title', 'before_row' => '
', ], @@ -472,11 +520,6 @@ class Opalestate_Emails { 'name' => esc_html__( 'Email Subject', 'opalestate-pro' ), 'type' => 'text', 'desc' => esc_html__( 'The email subject a user should receive when they make an initial property request.', 'opalestate-pro' ), - 'attributes' => [ - 'placeholder' => 'Your property at I Love WordPress is pending', - get_bloginfo( 'name' ), - 'rows' => 3, - ], 'default' => esc_html__( 'You got a message', 'opalestate-pro' ), ], @@ -486,38 +529,11 @@ class Opalestate_Emails { 'type' => 'wysiwyg', 'default' => OpalEstate_Send_Email_Notification::get_default_template( 'enquiry' ), ], - /// email contact template //// + /// Email Request Review /// [ - 'name' => esc_html__( 'Email Contact Templates (Template Tags)', 'opalestate-pro' ), - 'desc' => $contact_list_tags . '

', - 'id' => 'opalestate_title_email_settings_6', - 'type' => 'title', - 'before_row' => '
', - ], - [ - 'id' => 'contact_email_subject', - 'name' => esc_html__( 'Email Subject', 'opalestate-pro' ), - 'type' => 'text', - 'desc' => esc_html__( 'The email subject a user should receive when they make an initial property request.', 'opalestate-pro' ), - 'attributes' => [ - 'placeholder' => 'Your property at I Love WordPress is pending', - get_bloginfo( 'name' ), - 'rows' => 3, - ], - 'default' => esc_html__( 'You got a message', 'opalestate-pro' ), - ], - - [ - 'id' => 'contact_email_body', - 'name' => esc_html__( 'Email Body', 'opalestate-pro' ), - 'type' => 'wysiwyg', - 'default' => OpalEstate_Send_Email_Notification::get_default_template(), - ], - /// Email Request Review /// - [ - 'name' => esc_html__( 'Email Request Review Templates (Template Tags)', 'opalestate-pro' ), + 'name' => esc_html__( 'Email Request Review Form (in the single property page)', 'opalestate-pro' ), 'desc' => $review_list_tags . '

', - 'id' => 'opalestate_title_email_settings_7', + 'id' => 'opalestate_title_email_request_review', 'type' => 'title', 'before_row' => '
', ], @@ -526,11 +542,6 @@ class Opalestate_Emails { 'name' => esc_html__( 'Email Subject', 'opalestate-pro' ), 'type' => 'text', 'desc' => esc_html__( 'The email subject a user should receive when they make an initial property request.', 'opalestate-pro' ), - 'attributes' => [ - 'placeholder' => 'Your property at I Love WordPress is pending', - get_bloginfo( 'name' ), - 'rows' => 3, - ], 'default' => esc_html__( 'You have a message request reviewing', 'opalestate-pro' ), ], @@ -540,6 +551,28 @@ class Opalestate_Emails { 'type' => 'wysiwyg', 'default' => OpalEstate_Send_Email_Request_Reviewing::get_default_template(), ], + /// email contact template //// + [ + 'name' => esc_html__( 'Email Contact Host Form (in the Agent/Agency page)', 'opalestate-pro' ), + 'desc' => $contact_list_tags . '

', + 'id' => 'opalestate_title_email_contact_author_form', + 'type' => 'title', + 'before_row' => '
', + ], + [ + 'id' => 'contact_email_subject', + 'name' => esc_html__( 'Email Subject', 'opalestate-pro' ), + 'type' => 'text', + 'desc' => esc_html__( 'The email subject a user should receive when they make an initial property request.', 'opalestate-pro' ), + 'default' => esc_html__( 'You got a message', 'opalestate-pro' ), + ], + + [ + 'id' => 'contact_email_body', + 'name' => esc_html__( 'Email Body', 'opalestate-pro' ), + 'type' => 'wysiwyg', + 'default' => OpalEstate_Send_Email_Notification::get_default_template(), + ], ] ), ]; @@ -550,7 +583,6 @@ class Opalestate_Emails { /** * get data of newrequest email * - * @return text: message * @var $args array: property_id , $body */ public static function replace_shortcode( $args, $body ) { @@ -585,7 +617,7 @@ class Opalestate_Emails { $submitted_date, get_bloginfo( 'name' ), get_home_url(), - date( "F j, Y, g:i a" ), + date_i18n( opalestate_email_date_format() ), $property_name, $property_link, ]; diff --git a/inc/email/class-opalestate-abs-email-template.php b/inc/email/class-opalestate-abs-email-template.php index a29ce569..eb32a3ac 100755 --- a/inc/email/class-opalestate-abs-email-template.php +++ b/inc/email/class-opalestate-abs-email-template.php @@ -1,23 +1,10 @@ - * @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved. - * @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html - * - * @website http://www.wpopal.com - * @support http://www.wpopal.com/support/forum.html - */ - if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** - * @class OpalEstate_Send_Email_Notification + * @class OpalEstate_Abstract_Email_Template * * @version 1.0 */ @@ -46,7 +33,6 @@ class OpalEstate_Abstract_Email_Template { /** * Get the description for this email notification. * - * @type abstract * @return string */ public function get_description() { @@ -57,6 +43,11 @@ class OpalEstate_Abstract_Email_Template { } + /** + * Get the content for this email notification. + * + * @return string + */ public function get_content_template() { } @@ -72,12 +63,13 @@ class OpalEstate_Abstract_Email_Template { 'receiver_name' => '', 'name' => '', 'receiver_email' => '', + 'property_name' => '', 'property_link' => '', 'property_edit_link' => '', 'message' => '', 'site_name' => get_bloginfo(), 'site_link' => get_home_url(), - 'current_time' => date( "F j, Y, g:i a" ), + 'current_time' => date_i18n( opalestate_email_date_format() ), 'phone' => '', ]; @@ -112,7 +104,6 @@ class OpalEstate_Abstract_Email_Template { } - public function get_body() { $template = $this->get_content_template(); diff --git a/inc/email/class-opalestate-admin-new-submitted.php b/inc/email/class-opalestate-admin-new-submitted.php index c30fa5c1..f29a9b23 100644 --- a/inc/email/class-opalestate-admin-new-submitted.php +++ b/inc/email/class-opalestate-admin-new-submitted.php @@ -44,7 +44,7 @@ class OpalEstate_Send_Email_Admin_New_Submitted extends OpalEstate_Abstract_Emai 'property_name' => $property->post_title, 'property_link' => get_permalink( $property_id ), 'property_edit_link' => get_edit_post_link( $property_id ), - 'current_time' => date( "F j, Y, g:i a" ), + 'current_time' => date_i18n( opalestate_email_date_format() ), ]; return $this->args; diff --git a/inc/email/class-opalestate-approve.php b/inc/email/class-opalestate-approve.php index dc1d0903..db8dd079 100644 --- a/inc/email/class-opalestate-approve.php +++ b/inc/email/class-opalestate-approve.php @@ -36,7 +36,7 @@ class OpalEstate_Send_Email_Approve extends OpalEstate_Abstract_Email_Template { 'submitted_date' => $property->post_date, 'property_name' => $property->post_title, 'property_link' => get_permalink( $property_id ), - 'current_time' => date( "F j, Y, g:i a" ), + 'current_time' => date_i18n( opalestate_email_date_format() ), ]; return $this->args; diff --git a/inc/email/class-opalestate-email-notifycation.php b/inc/email/class-opalestate-email-notifycation.php index e75dfdba..ee86a3b4 100755 --- a/inc/email/class-opalestate-email-notifycation.php +++ b/inc/email/class-opalestate-email-notifycation.php @@ -1,17 +1,4 @@ - * @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved. - * @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html - * - * @website http://www.wpopal.com - * @support http://www.wpopal.com/support/forum.html - */ - if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } @@ -23,6 +10,15 @@ class OpalEstate_Send_Email_Notification extends OpalEstate_Abstract_Email_Templ public $type = ''; + public function set_type( $content ) { + $type = ''; + if ( isset( $content['type'] ) && 'send_enquiry' === $content['type'] ) { + $type = 'enquiry'; + } + + $this->type = $type; + } + /** * Send Email */ @@ -43,7 +39,7 @@ class OpalEstate_Send_Email_Notification extends OpalEstate_Abstract_Email_Templ break; } - return $subject; + return $this->replace_tags( $subject ); } /** diff --git a/inc/email/class-opalestate-new-submitted.php b/inc/email/class-opalestate-new-submitted.php index 8f274fdc..2c1be8fa 100755 --- a/inc/email/class-opalestate-new-submitted.php +++ b/inc/email/class-opalestate-new-submitted.php @@ -48,7 +48,7 @@ class OpalEstate_Send_Email_New_Submitted extends OpalEstate_Abstract_Email_Temp 'submitted_date' => $property->post_date, 'property_name' => $property->post_title, 'property_link' => get_permalink( $property_id ), - 'current_time' => date( "F j, Y, g:i a" ), + 'current_time' => date_i18n( opalestate_email_date_format() ), ]; return $this->args; diff --git a/inc/email/class-opalestate-request-viewing.php b/inc/email/class-opalestate-request-viewing.php index 7d7a8077..1a272eca 100755 --- a/inc/email/class-opalestate-request-viewing.php +++ b/inc/email/class-opalestate-request-viewing.php @@ -1,23 +1,10 @@ - * @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved. - * @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html - * - * @website http://www.wpopal.com - * @support http://www.wpopal.com/support/forum.html - */ - if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** - * @class OpalEstate_Send_Email_Notification + * @class OpalEstate_Send_Email_Request_Reviewing * * @version 1.0 */ diff --git a/inc/message/class-opalestate-message.php b/inc/message/class-opalestate-message.php index f31a8f9d..78c5c281 100755 --- a/inc/message/class-opalestate-message.php +++ b/inc/message/class-opalestate-message.php @@ -115,18 +115,24 @@ class OpalEstate_User_Message { $subject = html_entity_decode( esc_html__( 'You got a message', 'opalestate-pro' ) ); $post['receiver_name'] = $member['receiver_name']; - $output = [ - 'subject' => $subject, - 'name' => isset( $post['name'] ) ? $post['name'] : '', - 'receiver_email' => $member['receiver_email'], - 'receiver_id' => $member['receiver_id'], - 'sender_id' => get_current_user_id(), - 'sender_email' => $post['email'], - 'email' => $post['email'], - 'phone' => $post['phone'], - 'message' => $post['message'], - 'post_id' => $post['post_id'], - 'type' => 'send_enquiry', + $property_id = absint( $post['post_id'] ); + $property = get_post( $property_id ); + + $output = [ + 'subject' => $subject, + 'name' => isset( $post['name'] ) ? $post['name'] : '', + 'receiver_email' => $member['receiver_email'], + 'receiver_id' => $member['receiver_id'], + 'sender_id' => get_current_user_id(), + 'sender_email' => $post['email'], + 'property_name' => $property->post_title, + 'property_link' => $property_id ? get_permalink( $property_id ) : get_home_url(), + 'property_edit_link' => get_edit_post_link( $property_id ), + 'email' => $post['email'], + 'phone' => $post['phone'], + 'message' => $post['message'], + 'post_id' => $post['post_id'], + 'type' => 'send_enquiry', ]; if ( $output['sender_id'] == $output['receiver_id'] ) { @@ -163,6 +169,7 @@ class OpalEstate_User_Message { 'post_id' => '', 'sender_id' => '', 'email' => '', + 'name' => '', 'phone' => '', 'message' => '', 'message_action' => '', @@ -176,14 +183,13 @@ class OpalEstate_User_Message { $post['receiver_name'] = $member['receiver_name']; - $output = [ 'subject' => $subject, - 'name' => $member['name'], 'receiver_email' => $member['receiver_email'], 'receiver_id' => $member['receiver_id'], 'sender_id' => get_current_user_id(), 'sender_email' => $post['email'], + 'name' => $post['name'], 'phone' => $post['phone'], 'message' => $post['message'], 'post_id' => $post['post_id'], @@ -195,7 +201,6 @@ class OpalEstate_User_Message { } return $output; - } /** @@ -258,7 +263,6 @@ class OpalEstate_User_Message { do_action( 'opalestate_process_send_email_before' ); if ( isset( $_POST['type'] ) && $_POST['type'] ) { $content = []; - switch ( trim( $_POST['type'] ) ) { case 'send_equiry': if ( wp_verify_nonce( $_POST['message_action'], 'send-enquiry-form' ) ) { @@ -680,48 +684,48 @@ class OpalEstate_User_Message { $fields = [ [ - 'id' => 'type', - 'name' => esc_html__( 'Type', 'opalestate-pro' ), - 'type' => 'hidden', - 'default' => 'send_request_review', + 'id' => 'type', + 'name' => esc_html__( 'Type', 'opalestate-pro' ), + 'type' => 'hidden', + 'default' => 'send_request_review', ], [ - 'id' => 'post_id', - 'name' => esc_html__( 'Property ID', 'opalestate-pro' ), - 'type' => 'hidden', - 'default' => $post_id, + 'id' => 'post_id', + 'name' => esc_html__( 'Property ID', 'opalestate-pro' ), + 'type' => 'hidden', + 'default' => $post_id, ], [ - 'id' => 'sender_id', - 'name' => esc_html__( 'Sender ID', 'opalestate-pro' ), - 'type' => 'hidden', - 'default' => $sender_id, + 'id' => 'sender_id', + 'name' => esc_html__( 'Sender ID', 'opalestate-pro' ), + 'type' => 'hidden', + 'default' => $sender_id, ], [ - 'id' => "{$prefix}date", - 'name' => esc_html__( 'Schedule', 'opalestate-pro' ), - 'type' => 'date', - 'before_row' => '', - 'required' => 'required', + 'id' => "{$prefix}date", + 'name' => esc_html__( 'Schedule', 'opalestate-pro' ), + 'type' => 'date', + 'before_row' => '', + 'required' => 'required', ], [ - 'id' => "{$prefix}time", - 'name' => esc_html__( 'Time', 'opalestate-pro' ), - 'type' => 'select', - 'options' => opalestate_get_time_lapses(), + 'id' => "{$prefix}time", + 'name' => esc_html__( 'Time', 'opalestate-pro' ), + 'type' => 'select', + 'options' => opalestate_get_time_lapses(), ], [ - 'id' => "{$prefix}phone", - 'name' => esc_html__( 'Phone', 'opalestate-pro' ), - 'type' => 'text', - 'required' => 'required', + 'id' => "{$prefix}phone", + 'name' => esc_html__( 'Phone', 'opalestate-pro' ), + 'type' => 'text', + 'required' => 'required', ], [ - 'id' => "{$prefix}message", - 'name' => esc_html__( 'Message', 'opalestate-pro' ), - 'type' => 'textarea', - 'default' => $msg, - 'required' => 'required', + 'id' => "{$prefix}message", + 'name' => esc_html__( 'Message', 'opalestate-pro' ), + 'type' => 'textarea', + 'default' => $msg, + 'required' => 'required', ], ]; diff --git a/inc/mixes-functions.php b/inc/mixes-functions.php index e08da43b..5c3c244d 100755 --- a/inc/mixes-functions.php +++ b/inc/mixes-functions.php @@ -1293,8 +1293,9 @@ function opalestate_is_enable_areasize_field() { } function opalestate_is_require_login_to_show_author_box() { - $require = opalestate_get_option( 'enable_single_login_to_show_author_box', 'off' ); - return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() ); + $require = opalestate_get_option( 'enable_single_login_to_show_author_box', 'off' ); + + return ! ( $require == 'on' ) || ( $require == 'on' && is_user_logged_in() ); } /** @@ -1354,3 +1355,12 @@ function opalestate_widgets_init() { } add_action( 'widgets_init', 'opalestate_widgets_init' ); + +/** + * Get email date format. + * + * @return mixed|void + */ +function opalestate_email_date_format() { + return apply_filters( 'opalestate_email_date_format', 'F j, Y, g:i a' ); +} diff --git a/opal-estate-pro.php b/opal-estate-pro.php index 654352ee..35a2c0aa 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.3.3 + * Version: 1.3.4 * Author: WPOPAL * Author URI: http://www.wpopal.com * Requires at least: 4.9 @@ -150,7 +150,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.3.3' ); + _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.3.4' ); } /** @@ -159,7 +159,7 @@ if ( ! class_exists( 'OpalEstate' ) ) { public function setup_constants() { // Plugin version if ( ! defined( 'OPALESTATE_VERSION' ) ) { - define( 'OPALESTATE_VERSION', '1.3.3' ); + define( 'OPALESTATE_VERSION', '1.3.4' ); } // Plugin Folder Path diff --git a/readme.txt b/readme.txt index 5ed5ead9..efbdbf0e 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.3.3 +Stable tag: 1.3.4 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -156,6 +156,9 @@ This section describes how to install the plugin and get it working. * System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page") == Changelog == += 1.3.4 - 2020-02-21 = +* Fixes - Enquire email & Contact email + = 1.3.3 - 2020-02-20 = * Added - Required login to show Author box * Added - Search field settings.