Fixes. Tag 1.4.9.2

This commit is contained in:
Hoang Huu 2020-05-21 17:08:16 +07:00
parent 4ddb72638e
commit 05d30614ed
15 changed files with 102 additions and 63 deletions

View File

@ -4036,3 +4036,8 @@ header#masthead {
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
.opalestate-read-message .message-container {
border-bottom: 1px solid #ebebeb;
margin-bottom: 15px;
}

View File

@ -477,3 +477,8 @@
} }
} }
} }
.opalestate-read-message .message-container {
border-bottom: 1px solid #ebebeb;
margin-bottom: 15px;
}

View File

@ -1,3 +1,7 @@
= 1.4.9.2 - 2020-05-21 =
* Added - Message additional information.
* Fixes - Set feature property for customers.
= 1.4.9.1 - 2020-05-14 = = 1.4.9.1 - 2020-05-14 =
* Fixes - Responsive slider. * Fixes - Responsive slider.

BIN
inc/.DS_Store vendored

Binary file not shown.

BIN
inc/admin/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -158,6 +158,7 @@ class Opalestate_Settings_Pages_Tab extends Opalestate_Settings_Base_Tab {
'on' => esc_html__( 'Enable', 'opalestate-pro' ), 'on' => esc_html__( 'Enable', 'opalestate-pro' ),
'off' => esc_html__( 'Disable', 'opalestate-pro' ), 'off' => esc_html__( 'Disable', 'opalestate-pro' ),
], ],
'default' => 'off',
], ],
[ [
'name' => esc_html__( 'Show Submission', 'opalestate-pro' ), 'name' => esc_html__( 'Show Submission', 'opalestate-pro' ),

View File

@ -211,7 +211,7 @@ function opalestate_toggle_featured_property() {
$check = apply_filters( 'opalestate_set_feature_property_checked', false ); $check = apply_filters( 'opalestate_set_feature_property_checked', false );
if ( $check ) { if ( $check ) {
do_action( 'opalestate_toggle_featured_property_before', $user_id, $property_id ); do_action( 'opalestate_toggle_featured_property_before', $user_id, $property_id );
update_post_meta( $property_id, OPALESTATE_PROPERTY_PREFIX . 'featured', 1 ); update_post_meta( $property_id, OPALESTATE_PROPERTY_PREFIX . 'featured', 'on' );
echo json_encode( [ 'status' => true, 'msg' => esc_html__( 'Could not set this as featured', 'opalestate-pro' ) ] ); echo json_encode( [ 'status' => true, 'msg' => esc_html__( 'Could not set this as featured', 'opalestate-pro' ) ] );
wp_die(); wp_die();
} }

View File

@ -370,29 +370,32 @@ class OpalEstate_User_Message {
$charset_collate = $wpdb->get_charset_collate(); $charset_collate = $wpdb->get_charset_collate();
$sql = 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . 'opalestate_message' . ' ( $sql = 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . 'opalestate_message' . ' (
`id` int(11) UNSIGNED NOT NULL, `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`message` text COLLATE utf8mb4_unicode_ci NOT NULL, `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`sender_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`sender_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`sender_id` int(11) DEFAULT NULL, `sender_id` int(11) DEFAULT NULL,
`created` datetime NOT NULL, `created` datetime NOT NULL,
`receiver_id` int(11) NOT NULL, `receiver_id` int(11) NOT NULL,
`post_id` int(11) NOT NULL, `post_id` int(11) NOT NULL,
`type` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`isread` tinyint(1) NOT NULL `isread` tinyint(1) NOT NULL,
PRIMARY KEY (id)
) ' . $charset_collate; ) ' . $charset_collate;
dbDelta( $sql ); dbDelta( $sql );
/// ///
$sql = 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . 'opalestate_message_reply' . ' ( $sql = 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . 'opalestate_message_reply' . ' (
`id` int(11) NOT NULL, `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`message_id` int(11) NOT NULL, `message_id` int(11) NOT NULL,
`sender_id` int(11) NOT NULL, `sender_id` int(11) NOT NULL,
`message` text NOT NULL, `message` text NOT NULL,
`created` datetime NOT NULL, `created` datetime NOT NULL,
`receiver_id` int(11) NOT NULL `receiver_id` int(11) NOT NULL,
PRIMARY KEY (id)
) ' . $charset_collate; ) ' . $charset_collate;
dbDelta( $sql ); dbDelta( $sql );

View File

@ -119,17 +119,19 @@ class OpalEstate_User_Request_Viewing {
$charset_collate = $wpdb->get_charset_collate(); $charset_collate = $wpdb->get_charset_collate();
$sql = 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . 'opalestate_message' . ' ( $sql = 'CREATE TABLE IF NOT EXISTS ' . $wpdb->prefix . 'opalestate_message' . ' (
`id` int(11) UNSIGNED NOT NULL, `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `subject` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`message` text COLLATE utf8mb4_unicode_ci NOT NULL, `message` text COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`sender_email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`sender_email` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`sender_id` int(11) DEFAULT NULL, `sender_id` int(11) DEFAULT NULL,
`created` datetime NOT NULL, `created` datetime NOT NULL,
`receiver_id` int(11) NOT NULL, `receiver_id` int(11) NOT NULL,
`post_id` int(11) NOT NULL, `post_id` int(11) NOT NULL,
`type` varchar(250) COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`isread` tinyint(1) NOT NULL `isread` tinyint(1) NOT NULL,
PRIMARY KEY (id)
) ' . $charset_collate; ) ' . $charset_collate;
dbDelta( $sql ); dbDelta( $sql );

BIN
inc/vendors/.DS_Store vendored

Binary file not shown.

View File

@ -3,7 +3,7 @@
* Plugin Name: Opal Estate Pro * Plugin Name: Opal Estate Pro
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/ * 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. * Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
* Version: 1.4.9.1 * Version: 1.4.9.2
* Author: WPOPAL * Author: WPOPAL
* Author URI: http://www.wpopal.com * Author URI: http://www.wpopal.com
* Requires at least: 4.9 * Requires at least: 4.9
@ -150,7 +150,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
*/ */
public function __clone() { public function __clone() {
// Cloning instances of the class is forbidden // Cloning instances of the class is forbidden
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.4.9.1' ); _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.4.9.2' );
} }
/** /**
@ -159,7 +159,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
public function setup_constants() { public function setup_constants() {
// Plugin version // Plugin version
if ( ! defined( 'OPALESTATE_VERSION' ) ) { if ( ! defined( 'OPALESTATE_VERSION' ) ) {
define( 'OPALESTATE_VERSION', '1.4.9.1' ); define( 'OPALESTATE_VERSION', '1.4.9.2' );
} }
// Plugin Folder Path // Plugin Folder Path

View File

@ -152,6 +152,10 @@ 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") * System tickets support 24/7 available : [free support](https://themelexus.ticksy.com/ "Visit the Plugin support Page")
== Changelog == == Changelog ==
= 1.4.9.2 - 2020-05-21 =
* Added - Message additional information.
* Fixes - Set feature property for customers.
= 1.4.9.1 - 2020-05-14 = = 1.4.9.1 - 2020-05-14 =
* Fixes - Responsive slider. * Fixes - Responsive slider.

BIN
templates/.DS_Store vendored

Binary file not shown.

View File

@ -1,8 +1,8 @@
<?php <?php
$args = array( $args = [
'cpage' => isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1, 'cpage' => isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1,
'items_per_page' => 10 'items_per_page' => 10,
); ];
$messages = opalestate_get_message_by_user( $args ); $messages = opalestate_get_message_by_user( $args );
?> ?>
<div class="opalestate-admin-box"> <div class="opalestate-admin-box">
@ -14,7 +14,14 @@ $messages = opalestate_get_message_by_user( $args );
<tr> <tr>
<td width="220"> <td width="220">
<img src="<?php echo OpalEstate_User::get_author_picture( $message->sender_id ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/> <img src="<?php echo OpalEstate_User::get_author_picture( $message->sender_id ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/>
<?php if ( $message->sender_id ) : ?>
<span><?php echo opalestate_user_fullname( $message->sender_id ); ?></span> <span><?php echo opalestate_user_fullname( $message->sender_id ); ?></span>
<?php endif; ?>
<?php if ( isset( $message->name ) && $message->name ) : ?>
<span><?php echo esc_html( $message->name ); ?></span>
<?php endif; ?>
<div><?php echo esc_html( $message->sender_email ); ?></div>
<div><?php echo esc_html( $message->phone ); ?></div>
</td> </td>
<td> <td>
<a href="<?php echo opalestate_get_read_message_uri( $message->id ); ?>"> <a href="<?php echo opalestate_get_read_message_uri( $message->id ); ?>">
@ -22,7 +29,7 @@ $messages = opalestate_get_message_by_user( $args );
<p><?php echo esc_html( $message->message ); ?></p> <p><?php echo esc_html( $message->message ); ?></p>
</a> </a>
</td> </td>
<td width="200"><?php echo esc_html( $message->created ); ?></td> <td width="200"><code><?php echo esc_html( $message->created ); ?></code></td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
@ -32,14 +39,14 @@ $messages = opalestate_get_message_by_user( $args );
<div class="opalestate-pagination pagination-main"> <div class="opalestate-pagination pagination-main">
<?php <?php
echo paginate_links( array( echo paginate_links( [
'base' => add_query_arg( 'cpage', '%#%' ), 'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '', 'format' => '',
'prev_text' => esc_html__( '&laquo;' ), 'prev_text' => esc_html__( '&laquo;' ),
'next_text' => esc_html__( '&raquo;' ), 'next_text' => esc_html__( '&raquo;' ),
'total' => ceil( $messages['total'] / $args['items_per_page'] ), 'total' => ceil( $messages['total'] / $args['items_per_page'] ),
'current' => $args['cpage'] 'current' => $args['cpage'],
)); ] );
?> ?>
</div> </div>
</div> </div>

View File

@ -14,8 +14,13 @@ $id = 'message-reply';
<div class="message-meta"> <div class="message-meta">
<div class="message-avatar"> <div class="message-avatar">
<img src="<?php echo esc_url( OpalEstate_User::get_author_picture( $message->sender_id ) ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/> <img src="<?php echo esc_url( OpalEstate_User::get_author_picture( $message->sender_id ) ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/>
<?php if ( isset( $message->name ) && $message->name ) : ?>
<span class="message-name"><?php echo esc_html( $message->name ); ?></span>
<?php endif; ?>
<span class="message-email"><?php echo esc_html( $message->sender_email ); ?></span> /
<span class="message-phone"><?php echo esc_html( $message->phone ); ?></span>
</div> </div>
<span class="message-date"><?php echo esc_html( $message->created ); ?></span> <code class="message-date"><?php echo esc_html( $message->created ); ?></code>
</div> </div>
<div class="message-content"> <div class="message-content">
<p><?php echo esc_html( $message->message ); ?></p> <p><?php echo esc_html( $message->message ); ?></p>
@ -27,9 +32,12 @@ $id = 'message-reply';
<div class="message-body"> <div class="message-body">
<div class="message-avatar"> <div class="message-avatar">
<img src="<?php echo OpalEstate_User::get_author_picture( $reply->sender_id ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/> <img src="<?php echo OpalEstate_User::get_author_picture( $reply->sender_id ); ?>" width="60" alt="<?php esc_attr_e( 'User Avatar', 'opalestate-pro' ); ?>"/>
<?php if ( $reply->sender_id ) : ?>
<span class="message-name"><?php echo opalestate_user_fullname( $reply->sender_id ); ?></span>
<?php endif; ?>
</div> </div>
<code class="message-date"><?php echo esc_html( $reply->created ); ?></code>
<div class="message-content"> <div class="message-content">
<div><?php echo $reply->created; ?></div>
<?php echo $reply->message; ?> <?php echo $reply->message; ?>
</div> </div>
</div> </div>