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%;
transform: translateY(-50%);
}
.opalestate-read-message .message-container {
border-bottom: 1px solid #ebebeb;
margin-bottom: 15px;
}

View File

@ -476,4 +476,9 @@
top:0;
}
}
}
}
.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 =
* 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' ),
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
],
'default' => 'off',
],
[
'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 );
if ( $check ) {
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' ) ] );
wp_die();
}

View File

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

View File

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

BIN
inc/vendors/.DS_Store vendored

Binary file not shown.

View File

@ -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.4.9.1
* Version: 1.4.9.2
* 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.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() {
// Plugin version
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
define( 'OPALESTATE_VERSION', '1.4.9.1' );
define( 'OPALESTATE_VERSION', '1.4.9.2' );
}
// 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")
== 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 =
* Fixes - Responsive slider.

BIN
templates/.DS_Store vendored

Binary file not shown.

View File

@ -1,46 +1,53 @@
<?php
$args = array(
'cpage' => isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1,
'items_per_page' => 10
);
$messages = opalestate_get_message_by_user( $args );
<?php
$args = [
'cpage' => isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1,
'items_per_page' => 10,
];
$messages = opalestate_get_message_by_user( $args );
?>
<div class="opalestate-admin-box">
<h3 class="page-title"><?php echo sprintf( esc_html__( 'Messages for you', 'opalestate-pro'), '' ); ?></h3>
<div class="opalestate-messages-list">
<div class="message-item">
<table>
<?php foreach( $messages['items'] as $message ): ?>
<tr>
<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' ); ?>"/>
<span><?php echo opalestate_user_fullname( $message->sender_id ); ?></span>
</td>
<td>
<a href="<?php echo opalestate_get_read_message_uri( $message->id ); ?>">
<h6><?php echo esc_html( $message->subject ); ?></h6>
<p><?php echo esc_html( $message->message ); ?></p>
</a>
</td>
<td width="200"><?php echo esc_html( $message->created ); ?></td>
</tr>
<h3 class="page-title"><?php echo sprintf( esc_html__( 'Messages for you', 'opalestate-pro' ), '' ); ?></h3>
<div class="opalestate-messages-list">
<div class="message-item">
<table>
<?php foreach ( $messages['items'] as $message ): ?>
<tr>
<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' ); ?>"/>
<?php if ( $message->sender_id ) : ?>
<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>
<a href="<?php echo opalestate_get_read_message_uri( $message->id ); ?>">
<h6><?php echo esc_html( $message->subject ); ?></h6>
<p><?php echo esc_html( $message->message ); ?></p>
</a>
</td>
<td width="200"><code><?php echo esc_html( $message->created ); ?></code></td>
</tr>
<?php endforeach; ?>
</table>
</div>
<div class="opalestate-pagination pagination-main">
<?php
echo paginate_links( array(
'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '',
'prev_text' => esc_html__('&laquo;'),
'next_text' => esc_html__('&raquo;'),
'total' => ceil( $messages['total'] / $args['items_per_page'] ),
'current' => $args['cpage']
));
</table>
</div>
<div class="opalestate-pagination pagination-main">
<?php
echo paginate_links( [
'base' => add_query_arg( 'cpage', '%#%' ),
'format' => '',
'prev_text' => esc_html__( '&laquo;' ),
'next_text' => esc_html__( '&raquo;' ),
'total' => ceil( $messages['total'] / $args['items_per_page'] ),
'current' => $args['cpage'],
] );
?>
</div>
</div>
</div>
</div>
</div>

View File

@ -14,22 +14,30 @@ $id = 'message-reply';
<div class="message-meta">
<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' ); ?>"/>
<?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>
<span class="message-date"><?php echo esc_html( $message->created ); ?></span>
<code class="message-date"><?php echo esc_html( $message->created ); ?></code>
</div>
<div class="message-content">
<p><?php echo esc_html( $message->message ); ?></p>
<p><?php echo esc_html( $message->message ); ?></p>
</div>
</div>
</div>
<?php if ( $replies ): ?>
<?php foreach ( $replies as $reply ): ?>
<?php foreach ( $replies as $reply ) : ?>
<div class="message-body">
<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' ); ?>"/>
<?php if ( $reply->sender_id ) : ?>
<span class="message-name"><?php echo opalestate_user_fullname( $reply->sender_id ); ?></span>
<?php endif; ?>
</div>
<code class="message-date"><?php echo esc_html( $reply->created ); ?></code>
<div class="message-content">
<div><?php echo $reply->created; ?></div>
<?php echo $reply->message; ?>
</div>
</div>